Skip to main content

A simple MongoDB module with less configuration

Project description

Simple Mongo (A Simple Mongodb Library)

Pypi link: https://pypi.org/project/simple-mongo/

Getting Started:

  • To run and test the library, it should required to provide an environment variables by creating an .env file:
    MONGODB_URL="mongodb://your-url-here"
    MONGODB_NAME="your-database-name-here"

Running a simple query:

  • Get All documents within a collection:
# supposed that we have a 'users' collection

from simple_mongo.database import MongoDB

MongoDB.all('users')
  • Get a specific document:
MongoDB.find_one({
    'name' : 'Taylor Swift'
})
  • Create a simple data to a collection:
MongoDB.create('users',
    {
        'name': 'John Doe', 
        'email': 'johndoe@gmail.com'
    }
)
  • Update a document from a collection:
MongoDB.update('users', {
    'name' : 'John Doe'
}, {
    'name' : 'John Sins'
})
  • Delete a document from a collection:
MongoDB.delete('users', {
    'name' : 'John Sins'
})

Repository Link: https://github.com/nojram00/simple-mongo

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

simple_mongo-0.0.9.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

simple_mongo-0.0.9-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file simple_mongo-0.0.9.tar.gz.

File metadata

  • Download URL: simple_mongo-0.0.9.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for simple_mongo-0.0.9.tar.gz
Algorithm Hash digest
SHA256 2bdf4cbe4522ed6ccc35db560a69a40d700627ff3c1a4e3bf449fa626a018699
MD5 e47a21efc2582d3c26a8a491b51ebff2
BLAKE2b-256 9f0432df4b16b33b9921704d9cd723a6f04a07ece21afc74291fa4074dc7f592

See more details on using hashes here.

File details

Details for the file simple_mongo-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: simple_mongo-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for simple_mongo-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 797d1c6a5e9b8f1e7771af59cef820939c46626f4b2ee51a02d5091ea43d5690
MD5 b248357cfca2f4c518e0e0b10b1931a8
BLAKE2b-256 14520134518827c2cec7ebf5951f5e0fbd37fcb124107e34125015f4b47f43cf

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