A simple library for easy work with key-value storages and document databases
Project description
NoSQL Storage Wrapper
A simple library for easy work with key-value storages and document databases
Instalation
pip install nosql-storage-wrapper
Upgrade
pip install --upgrade nosql-storage-wrapper
Work with MongoDB
By default work asynchrous version
from nosql_storage_wrapper.mongo import Storage
For synchrous version use this code:
from nosql_storage_wrapper.mongo.sync import Storage
Configuring
This library requires the MagicConfig library to work.
pip install magic-config
Configuring with .env file:
MONGO_HOST="127.0.0.1"
MONGO_USER="user"
MONGO_PWD="******"
MONGO_DB="basename"
MONGO_PORT=27017
Using
For example some code in aiogram
from nosql_storage_wrapper.mongo import Storage
async some_foo():
await Storage("aiogram_state").delete_one({"chat": Config.DEBUG_USER_ID})
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
Built Distribution
Close
Hashes for nosql-storage-wrapper-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1372472832920a58b79b7aaf54103f82a0b254c57bbfefe093f8bed56e00a6a1 |
|
MD5 | 681f21e6a51841bb3befab61813157fc |
|
BLAKE2b-256 | 628fa0dc956b8cf5ec9adeb6a71a01968bea764402cf66c8d1c3cfb65c0f3ae9 |
Close
Hashes for nosql_storage_wrapper-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f53c25a766038067e3cedc6d8983b0996c402c4b152eae976ca6e15720201c4a |
|
MD5 | 7daddb278feed1f9c42c75d3a24e6fcb |
|
BLAKE2b-256 | 7c3bcdabef9e2706a8f39b3829a7a712fd24ebbf27962ee3b8ef78cddc731e52 |