Skip to main content

Rainbond python cloud native development base library

Project description

Rainbond Python

Rainbond python cloud native development base library.

Instructions

rainbond -c demo-component

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 = {'$set': {'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 = {'$set': {'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.6.tar.gz (7.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rainbond-python-0.2.6.tar.gz
  • Upload date:
  • Size: 7.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.6.tar.gz
Algorithm Hash digest
SHA256 f3f266635ac6edc263070edb3564950226a350b4445ff7b0fc8710cc2b5b1813
MD5 76a40a8db6a9810f7fc573d9d711e03f
BLAKE2b-256 33f259af026499ecede935c53d0e7ad446a3a45a99f526fe6982b3aef6b0d35b

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