A FSM Storage for aiogram 3.0+, based on SQLite.
Project description
A FSM Storage for aiogram 3.0+
It's a very simple FSM Storage for the aiogram 3.0+. It uses local SQLite database for storing states and data. It's possible to chose method of serializing data in the database. A 'pickle' or a 'json' are available. A 'pickle' is used as default.
Installation:
pip install aiogram-sqlite-storage
Usage:
from aiogram import Dispatcher
# Import SQLStorage class
from aiogram_sqlite_storage.sqlitestore import SQLStorage
# Initialise a storage
# Path to a database is optional. 'fsm_starage.db' will be created for default.
# 'serializing_method' is optional. 'pickle' is a default value. Also a 'json' is possible.
my_storage = SQLStorage('my_db_path.db', serializing_method = 'pickle')
# Initialize dispetcher with the storage
dp = Dispatcher(storage = my_storage)
# Use your FSM states and data as usual
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
Built Distribution
Close
Hashes for aiogram_sqlite_storage-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 006d9b5f706d052e0a4736b7e128e7acf3752e4799b446732b6b95229490de2f |
|
MD5 | 8163db848f66b5bd1b4e703b4c4b6ae7 |
|
BLAKE2b-256 | b0dc4b2a73ce53f54a0c9284d3f849efa2e56d46954291da17a9bf1f60fb732b |
Close
Hashes for aiogram_sqlite_storage-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b3a969dd8aa4146f4305fb2998da897e732ab98c867625d577fee1d7df7394 |
|
MD5 | fcb28f3b5ed2143ddc06fb58be848b38 |
|
BLAKE2b-256 | 3f9f38bf87896936435f2097cbd24f164de1180b432f9bb3aa249de2db4bcbec |