aiogram FSM storage, stores all data in SQLite database.
Project description
Yet Another FSM SQLite Storage
[!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
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
File details
Details for the file aiogram_fsm_sqlitestorage-1.0.0.tar.gz
.
File metadata
- Download URL: aiogram_fsm_sqlitestorage-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
db3e24e99b29869814350c4b550c3e3097624d88c2fe276a684066c4bf2e44b1
|
|
MD5 |
66c35c04dcf15219023af32f0f95f895
|
|
BLAKE2b-256 |
ef4fcd2377595f7a6343ff9c488978f3a7d071d57483135c8ed2f9af4b9d8c64
|
File details
Details for the file aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4178fe9e6e8b8d6dae4c06f6c10156e64171e3cb73fe8c255b3741193b73c7f4
|
|
MD5 |
e71cf749c65c6097e5f5425fa2438b6b
|
|
BLAKE2b-256 |
8d50b8719d66a34c93098392fcbcc66432fd50ba924cb770bc7433fb52c6fbf0
|