Skip to main content

A FSM Storage for aiogram 3.0+, based on SQLite and picle.

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. And using 'pickle' libruary for serializing objects. It's sutable for small and simple projects.

Installation:

pip install aiogram-sqlite-storage

Usage:

# Import SQLStorage class
from aiogram_sqlite_storage.sqlitestore import SQLStorage
from aiogram import Dispatcher

# Initialise a storage
# Path to a database is optional. 'fsm_starage.db' will be created for default.
my_storage = SQLStorage('my_db_path.db')

# 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-0.2.0.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

aiogram_sqlite_storage-0.2.0-py3-none-any.whl (15.5 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