SQLiteStorage is a very good FSM Storage for Telegram bots.
Project description
""" SQLiteStorage is a modern FSM Storage for Telegram Bots on Python. It is surprisingly easy to connect and use.
Install
.. code-block:: console
$ pip install sqlite-fsm-storage
Example of use in a telegram bot on aiogram:
.. code-block:: python
from aiogram import Bot, Dispatcher from sqlite_fsm_storage import SQLiteStorage import asyncio
async def main(): bot = Bot(token='YOUR_BOT_TOKEN', parse_mode='HTML') storage = SQLiteStorage() await storage.start() dp = Dispatcher(storage=storage) await bot.delete_webhook(drop_pending_updates=True) try: await dp.start_polling(bot, allowed_updates=['message', 'callback_query']) except CancelledError: pass finally: await bot.session.close() await storage.close() if name == 'main': asyncio.run(main())
Developer - Blaze Egor """
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
Hashes for sqlite_fsm_storage-2.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 992883481e5f690470d375668c1f1978b11e3f74cc9b199f742a0e8ae3001356 |
|
MD5 | 711163b3aaa1406ed97501ee03b0b828 |
|
BLAKE2b-256 | 7d9a05933c9599722734ced0df7d938e88383d6794746a50b9a841afeab01b6f |