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.5.tar.gz (9.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rainbond-python-0.2.5.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.5.tar.gz
Algorithm Hash digest
SHA256 c758a3b5715e6ac7c13e2f1dd2b3b6df97f689f0830f8869ebb0ddb2118a236e
MD5 ee74c66355c6011797af75b3892001b7
BLAKE2b-256 c0d3e0b5d69184c9a66db2b25ea75aea792cc4b31e56e6b0f69f96cd00887377

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