Skip to main content

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

nosql-storage-wrapper-0.1.3.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

nosql_storage_wrapper-0.1.3-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page