Skip to main content

A python library for communicating and Querying mongodb

Project description

dmongo

  • A python library for communicating and Querying mongodb

how to use

  1. Install package
pip install dmongo

  1. import the package
from dmongo.dmongo import mongoQuery

  1. initializing dmongo
  • To initialize dmongo, create a MONGO_URI, you either create the Database or dmongo will automatically creates it, if it doesn"t exist.
Query=mongoQuery(MONGO_URI="localhost:27017",Database="geof",collections="movies")

  1. creating a record
  • To create a new record, send in a data in this Dictionary format, where the key pair is the record name and the value pair is the value to be stored.
 Query.create({"name":"JohnDoe","email":"jdoe@gmail.com","username":"JohnD"})

  1. get all record
  • Returns all the record available in the defined collection of the specified Database
Query.getAll()

  1. get one record
  • Returns a particular record from the defined collection of the specified database base on it's ID. which is unique across the collection.
Query.getOne(ID="620843809255d268ce967245")

  1. updating a record
  • replaces the existing value of the specified key pair with a new value of the specified value pair according to the ID specified.
Query.update(ID="620843809255d268ce967245",data={"name":"JamesDoe"})

  1. filtering of record
  • Returns all the record record with the same value as specified
Query.filterBy(data={"name":"JamesDoe"})

  1. deleting a record
  • Deletes a record according to the ID specified.
Query.delete(ID="620843809255d268ce967245")

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

dmongo-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

dmongo-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file dmongo-0.1.0.tar.gz.

File metadata

  • Download URL: dmongo-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.5

File hashes

Hashes for dmongo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 79cc1cd658a3c757b35ac4afcefcd2e6d67805c7602fc7de25901a0b5ca063e8
MD5 60f81fd2816431b6531a9e054430fa3f
BLAKE2b-256 443912e18d6edf7fbeddb3a580dc45d1e6f5602df92dd916add464d2b60441db

See more details on using hashes here.

File details

Details for the file dmongo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dmongo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.5

File hashes

Hashes for dmongo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 380cecd19bf5bb4191f511aa8a3b8f0f877365e396245bb2728bf0741e612272
MD5 76a4259c3758fabb1c05fa9fc9ef5311
BLAKE2b-256 56d911178a463815c3915bea7a864d437d7bb5d5921a3d1f1eb6c209367e01a6

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