Magic-filter
lastmod 2026-11-10created 2024-05-052 edits
magic-filter is a Python library for writing filter conditions declaratively using dynamic attribute access. If you chain attribute access and comparison operations on the F object, as in F.text.startswith("/"), the expression is later applied to a real object to evaluate to true or false, and multiple conditions can be combined with logical operators. It was created for use as handler filters in aiogram 3, a Telegram bot framework.
This package provides magic filter based on dynamic attribute getter