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.39.tar.gz (8.4 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.39-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for heybooster-toolkit-0.0.39.tar.gz
Algorithm Hash digest
SHA256 141607b8c976f967db741d09512ebbd500168d1acda9a24c186187c05c55c705
MD5 2beafd1488925d70e8228cf470ce3fa6
BLAKE2b-256 4cb81339007473e1a06d99dd16a09365e0d70af8385738e0f4b85e905ee0414a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for heybooster_toolkit-0.0.39-py3-none-any.whl
Algorithm Hash digest
SHA256 ad8eece8237805bdd49b55f5e562a1d05eae550171dcfaf5cb9e1f96cca2f5d5
MD5 59b44680b551f337f89a8ac0645f1591
BLAKE2b-256 3390722ff3f2359d12e4f5a84b406df8acc1577a55047f4a7f8536981d6d53e4

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