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
Metadata
Release files for simple-mongo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple_mongo-0.1.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_mongo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / simple_mongo-0.1.0.tar.gz
| Download URL | simple_mongo-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9a2113f6773f9d7ebe8de58bb8ecb335398af5400e917255ebd4ac6e68586da
|
|
BLAKE2b-256 checksum How to use checksums |
9bce44bfc63eb8ef940bd88db8bcc6c122cf2b8a1880429f163f906330f57b9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / simple_mongo-0.1.0-py3-none-any.whl
| Download URL | simple_mongo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
143190e184ccd2e7fce3ad65b4b09c106f7110ddca51507f0b283d2e5d69c085
|
|
BLAKE2b-256 checksum How to use checksums |
701265fffe1e872a5b4c429f6c68f84e0ed58da3bc73f230e5f941a858e05729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|