Skip to content

Magick 🌟 for Aiogram 3.x-based Telegram bots: SQLite storage, etc.

License

Notifications You must be signed in to change notification settings

arichr/aiogram-magick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aiogram Magick

PyPI

Magick for Aiogram 3.x-based Telegram bots.

Read documentation

Compontents:

Getting started!

  1. Install aiogram_magick and dependencies for submodules:
pip install aiogram_magick

# For aiogram_magick.sqlite
pip install aiosqlite jsonpickle
  1. Import submodules that provide needed functionality (see examples below or read documentation)

Examples

SQLite storage

from aiogram_magick.sqlite import SqliteStorage

# By default, SqliteStorage is configured to:
#    - Commit changes on 30 minute idle and on shutdown;
#    - Cache states (up to 20 entries) and data (up to 10 entries);
#    - Ignore any exceptions;
#    - To avoid file corruptions on shutdown any `sqlite3.OperationalError`s
#      are printed using `traceback.print_exception` instead of raised normally.
dp = Dispatcher(storage=SqliteStorage('aiogram.sqlite'))

Releases

No releases published

Packages

No packages published

Languages