Save your data!
Aiogram-storages was created to extend the standard fsm_storage options in aiogram. Our library supports such databases as:
Installation
pip install AiogramStorages
PostgreSQL
Support for storage with the PostgreSQL database is due to the asyncpg asynchronous library, which gives a huge data processing speed, and, accordingly, the bot itself.
In order to use it, you need to create an instance of the PGStorage class, to which you need to pass the required parameters (user, password, db_name). You can also specify additional parameters (host, port).
Next, this instance must be passed to the Dispatcher.
Example
from AiogramStorages.storages import PGStorage
storage = PGStorage(username='YourUser', password='YourPassword', db_name='YourDbName')
dp = Dispatcher(bot, storage=storage)
Warning
By default, PGStorage creates three tables in your database named: aiogram-states, aiogram-data, aiogram-buckets.
We strongly recommend that you do not use these names as the name of the table, otherwise there may be disagreements.
SQLiteStorage
Support for storage with the SQLite database is due to the aiosqlite asynchronous library, which gives a huge data processing speed, and, accordingly, the bot itself.
In order to use it, you need to create an instance of the SQLiteStorage class, to which you need to pass the required parameters (db_path).
Next, this instance must be passed to the Dispatcher.
Example
from AiogramStorages.storages import SQLiteStorage
storage = SQLiteStorage(db_path='your_path')
dp = Dispatcher(bot, storage=storage)
Warning
By default, SQLiteStorage creates three tables in your database named: aiogram-states, aiogram-data, aiogram-buckets.
We strongly recommend that you do not use these names as the name of the table, otherwise there may be disagreements.
Metadata
Release files for AiogramStorages 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| AiogramStorages-1.0.0.tar.gz | 4.1 kB | Without provenance | Details for AiogramStorages-1.0.0.tar.gz |
Release files / AiogramStorages-1.0.0.tar.gz
| Download URL | AiogramStorages-1.0.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b217b04ea0a03f33638445b892a5bbfc773c6fb0d8a55029cd71e5219dcc770e
|
|
BLAKE2b-256 checksum How to use checksums |
3fe3c922e49f91f654bfc825058bd4c3571e13a27ed65234932dbdca3fc1cb2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for AiogramStorages 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.