Skip to main content

Rainbond python cloud native development base library

Project description

Rainbond Python

Rainbond python cloud native development base library.

Instructions

DBConnect

from rainbond_python.db_connect import DBConnect
db = DBConnect(db='db_name', collection='collection_name')

Write a docu

insert_dict = {'name': 'Xiao Ming', 'age': 23}
if db.write_one_docu(docu=insert_dict):
    print('Insert success')
else:
    print('Insert failure')

Does docu exist

examine_dict = {'name': 'Xiao Ming'}
if db.does_it_exist(docu=examine_dict):
    print('Docu already exists')
else:
    print('Docu does not exist')

Update docu

Modify the first
find_dict = {'name': 'Xiao Ming'}
modify_dict = {'name': 'Xiao Hong'}
if db.update_docu(find_docu=find_dict, modify_docu=modify_dict):
    print('Update success')
else:
    print('Update failure')
Modify all
find_dict = {'age': 23}
modify_dict = {'name': '23 year old'}
if db.update_docu(find_docu=find_dict, modify_docu=modify_dict, many=True):
    print('Update all success')
else:
    print('Update all failure')

Reference

  • Restful API : Representational State Transfer
  • 12 Factor : The twelve-factor app is a methodology for building software-as-a-service apps
  • RainBond : Cloud native and easy-to-use application management platform

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rainbond-python-0.2.4.tar.gz (9.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page