Skip to main content

Heybooster Toolkit

Project description

Heybooster MongoDB Helper

Installation:

pip3 install heybooster_toolkit

Example:

from heybooster.helpers.database.mongodb import MongoDBHelper


NAME = "database_name"
URI = "database_uri"

with MongoDBHelper(uri=URI, database=NAME) as db:
    result = db.find_one('test_collection', query={'email': 'test@email.com'})
    result = db.find('test_collection', query={'email': 'test@email.com'})
    db.insert('test_collection', query={'email': 'test@email.com'})
    db.insert('test_collection', query={'email': 'test@email.com'})
    db.find_and_modify('test_collection', query={'email': 'test@email.com'}, update={"$set": 'test2@gmail.com'})

or

from heybooster.helpers.database.mongodb import MongoDBHelper


NAME = "database_name"
URI = "database_uri"

db = MongoDBHelper(uri=URI, database=NAME)
result = db.find_one('test_collection', query={'email': 'test@email.com'})

db.close()
print(result)

Project details


Download files

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

Source Distribution

heybooster-toolkit-0.0.37.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heybooster_toolkit-0.0.37-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file heybooster-toolkit-0.0.37.tar.gz.

File metadata

  • Download URL: heybooster-toolkit-0.0.37.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for heybooster-toolkit-0.0.37.tar.gz
Algorithm Hash digest
SHA256 93ad31899b6b78c8ad253e1dcde29601c70f640742814a8d49ef3fbc7e730dc0
MD5 d36c3b09aec8d1d12a60ccc6ed8205cc
BLAKE2b-256 4996f10b052981df4d24fd6525f1331906434b64dea743b81265b601d632ad6b

See more details on using hashes here.

File details

Details for the file heybooster_toolkit-0.0.37-py3-none-any.whl.

File metadata

File hashes

Hashes for heybooster_toolkit-0.0.37-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc75ee6298e1da2315eb9b2c1591e47bf6f322dee01d89a4b329f6151312756
MD5 3bacd6601a5ff453c1dc72577b463a12
BLAKE2b-256 10318901e8fe7569909d29965d6b122c49667e0f51f1eb418dd409470f9ac86e

See more details on using hashes here.

Supported by

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