Skip to main content

aiogram FSM storage, stores all data in SQLite database.

Project description

Yet Another FSM SQLite Storage

PyPI - Wheel PyPI - Version PyPI - Python Version PyPI - License release develop

[!NOTE] When it was necessary for my project, I did not find such projects as osf4/sqlitestorage or sashaferrum/aiogram_sqlite_storage :sob: and adapted this fork to my needs. More forks to the God of forks! :laughing:

Simple aiogram FSM storage, stores all FSM data in SQLite database

Intended to replace MemoryStorage for simple cases where you want to keep states between bot restarts.

Implements just basic BaseStorage methods such as:

  • set_state()
  • get_state()
  • set_data()
  • get_data()
  • close()

Tests are based on original aiogram tests v3.13.1.

Installation

pip install aiogram-fsm-sqlitestorage

Usage

Include the following in your script:

# import aiogram and the rest
from aiogram_fsm_sqlitestorage import SQLiteStorage

dp = Dispatcher(bot, storage=SQLiteStorage())

Using SQLiteStorage() instead of MemoryStorage() makes your FSM data persistent between bot restarts.

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_fsm_sqlitestorage-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file aiogram_fsm_sqlitestorage-1.0.0.tar.gz.

File metadata

File hashes

Hashes for aiogram_fsm_sqlitestorage-1.0.0.tar.gz
Algorithm Hash digest
SHA256 db3e24e99b29869814350c4b550c3e3097624d88c2fe276a684066c4bf2e44b1
MD5 66c35c04dcf15219023af32f0f95f895
BLAKE2b-256 ef4fcd2377595f7a6343ff9c488978f3a7d071d57483135c8ed2f9af4b9d8c64

See more details on using hashes here.

File details

Details for the file aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4178fe9e6e8b8d6dae4c06f6c10156e64171e3cb73fe8c255b3741193b73c7f4
MD5 e71cf749c65c6097e5f5425fa2438b6b
BLAKE2b-256 8d50b8719d66a34c93098392fcbcc66432fd50ba924cb770bc7433fb52c6fbf0

See more details on using hashes here.

Supported by

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