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
Release history Release notifications | RSS feed
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.8.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_mongo-0.0.8.tar.gz.
File metadata
- Download URL: simple_mongo-0.0.8.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203ed09f352bccb2e78f8a55ae1b4a7eada14f8521f9ed3d8f38d003a477577f
|
|
| MD5 |
fce148e87d6f40c42d57006f7533d39b
|
|
| BLAKE2b-256 |
c9e812330bf788a665614c60919f248edeb1caebeb1a228b10470cd1a7b37bd8
|
File details
Details for the file simple_mongo-0.0.8-py3-none-any.whl.
File metadata
- Download URL: simple_mongo-0.0.8-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c97eef989460c2fcbdcdffa367e42ab840f3006e5a258985e85335a37f7e947
|
|
| MD5 |
0c33a62ffe4193a73a9805254645ad94
|
|
| BLAKE2b-256 |
648177ab8ee009cd18f53e49da2b83ba5391bb6b0255b6ddfa3070fc16427262
|