Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiogram_sqlite_storage-1.0.1.tar.gz (17.2 kB view details)

Uploaded Source

File details

Details for the file aiogram_sqlite_storage-1.0.1.tar.gz.

File metadata

File hashes

Hashes for aiogram_sqlite_storage-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fe571d51702d366fc82627de2326f609b47211785a9c054b49f761487b1053a6
MD5 8a5bae5c92d8f3c118b0b67665b13ee5
BLAKE2b-256 32724aa859d65a436a0563c72695d466b8e55b64351219cfdc910f991f021b9f

See more details on using hashes here.

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