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
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d56d5eadb2a2dc49affc09f5b1a849665b325a73c5ef8dfb2d2cd6804ba1b0c1 |
|
MD5 | 66ac7ea7083d3a54a100ff09c5b3efa5 |
|
BLAKE2b-256 | b14b07cd086d6ec6db01b9ce9cf74980aa5365507598adee2890981f84cbe06d |
Close
Hashes for nosql_storage_wrapper-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd49f151a4987768d74aeb72f882793b10b562375920ab6a70dfc372d89c9012 |
|
MD5 | 7f4663c4950a1c637ca2bd24a2b13bf6 |
|
BLAKE2b-256 | 0064c77968f025fa7500cd7e5d714ffebe52b28f1432ab74aac1a8ff729b3dc0 |