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 details)

Uploaded Source

File details

Details for the file rainbond-python-0.2.4.tar.gz.

File metadata

  • Download URL: rainbond-python-0.2.4.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for rainbond-python-0.2.4.tar.gz
Algorithm Hash digest
SHA256 928cf42b7852699f5f46b70568ac6e983cec2fb35a0de443144d5ca4ca49463e
MD5 f6aa44e77b35dfde199fa61ced80b07c
BLAKE2b-256 4d67e210d651fc78ddb87eff1571785de596794e54f251426194d10d5081e529

See more details on using hashes here.

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