AioSQLiteStorage is a modern async FSM Storage for Telegram Bots on Python. It is surprisingly easy to connect and use.
Install
$ pip install sqlite-fsm-storage
Example of use in a telegram bot on aiogram:
from aiogram import Bot, Dispatcher
from aiogram.dispatcher.dispatcher import CancelledError
from sqlite_fsm_storage import AioSQLiteStorage
import asyncio
async def main():
bot = Bot(token='YOUR_BOT_TOKEN', parse_mode='HTML')
storage = AioSQLiteStorage()
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
Metadata
Release files for sqlite-fsm-storage 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlite_fsm_storage-3.0.0.tar.gz | 2.6 kB | Without provenance | Details for sqlite_fsm_storage-3.0.0.tar.gz |
Release files / sqlite_fsm_storage-3.0.0.tar.gz
| Download URL | sqlite_fsm_storage-3.0.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7043cab1f6876baaad7441d82a85059c15bf7b816fee5bbfcc917976c522703
|
|
BLAKE2b-256 checksum How to use checksums |
d9def488f747dcbc5b6797c7be2f20f00f909338758d45cdb1e6100600e1ba61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for sqlite-fsm-storage 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.