Skip to main content

aiogram-nav

Standalone screen navigation for aiogram 3, with a typed registry, memory or Redis repositories, prepared rendering and explicit input bindings. Use reply keyboards, inline controls, commands or hybrids without adopting an idle framework.

Version 0.1.0 is an initial alpha release. Review the recovery and storage boundaries before adopting it in an application.

Install

Requires Python 3.10+ and aiogram 3.22 or newer within the 3.x series.

pip install aiogram-nav==0.1.0
# Optional persistent storage:
pip install 'aiogram-nav[redis]==0.1.0'

The runtime depends only on aiogram. Neither aiogram-idle nor Redis is required. See Redis setup and recovery. Contributors can install an editable checkout with uv sync --extra redis; see CONTRIBUTING.md.

Run a demonstration

Clone the repository for its runnable examples, then set BOT_TOKEN in the environment:

git clone https://github.com/ArmanAvanesyan/aiogram-nav.git
cd aiogram-nav
uv sync --python 3.12
uv run python examples/demo.py --style reply
uv run python examples/demo.py --style inline
uv run python examples/demo.py --style commands
uv run python examples/demo.py --style hybrid --fsm

/start opens a neutral example menu. Back preserves application drafts; Cancel uses an explicit application hook to discard only owned draft fields. The examples configure debug logging and never configure logging globally inside the library. CLI help runs without a token. Tests use a recording Telegram transport.

Core behavior

  • Register stable node IDs, structural parents, explicit Back/Cancel targets, validators and renderer keys. Authorization runs through one action pipeline.
  • go, back, home, cancel and refresh prepare an operation before effects. The previous screen remains current until rendering and completion succeed.
  • Stage receipts retain partial renders. Confirmed effects can be recovered; unknown sends are not repeated automatically. Explicit refresh can select a new presentation operation, while unknown business cancellation stays guarded.
  • track adopts an existing successful render. For recoverable application screen helpers, use prepare_render before sending and complete_render afterward.
  • Accepted activity is explicit through navigation actions or touch; background renders can preserve the activity clock. Absolute session expiry never slides.
  • Opaque callbacks bind actor, conversation, session and view. Localized reply text and bare commands act on current state and cannot prove an old origin.
  • Dispatcher middleware protects the whole handler and shares verified FSM isolation. Binding routers precede business routers; Dispatcher root handlers must not outrank installed navigation bindings.

See quickstart, public API, migration, storage and verification. The memory audit records concurrency, callback and FSM review corrections.

Boundaries

Memory storage supports one event loop/process and loses everything on restart. Application FSM state, authorization and business drafts remain application-owned. A stage recorder cannot make Telegram and a database transactional.

The optional navigation/idle adapter lives in aiogram_idle.integrations.nav; adopting it is explicit and does not add an idle dependency to this package. See optional integration. Multiple simultaneous panels and durable analytics remain deferred.

Development

uv sync --extra redis
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .
uv run --no-sync pyright src examples
uv run --no-sync pytest
# Full coverage including real Redis (see docs/redis.md):
AIOGRAM_NAV_REDIS_URL=redis://localhost:6379/0 AIOGRAM_NAV_REQUIRE_REDIS=1 uv run --extra redis pytest --cov=aiogram_nav --cov-report=term-missing
uv run --no-sync mkdocs build --strict
uv build
uv run --no-sync twine check dist/*

See CONTRIBUTING.md for repository conventions and verification, SECURITY.md for vulnerability reporting, and release guidance for maintainer procedures.

MIT licensed. See LICENSE.

Metadata

Release files for aiogram-nav 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiogram-nav 0.1.0
File Size Uploaded Provenance Actions
aiogram_nav-0.1.0.tar.gz 359.7 kB With provenance Details for aiogram_nav-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiogram-nav 0.1.0
File Interpreter ABI Platform Actions
aiogram_nav-0.1.0-py3-none-any.whl Python 3 none any Details for aiogram_nav-0.1.0-py3-none-any.whl

Total release size: 430.9 kB

Release files / aiogram_nav-0.1.0.tar.gz

Download URL aiogram_nav-0.1.0.tar.gz
Size 359.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b725000a43e12ec7e10dc422a9f3d0e02946f69b6751fbc020adb0c2cf4b8fd
BLAKE2b-256 checksum
How to use checksums
b695b6061b0c484506e3e64720a99a8aef7706d41c215974fbfae5fb6e45a05a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / aiogram_nav-0.1.0-py3-none-any.whl

Download URL aiogram_nav-0.1.0-py3-none-any.whl
Size 71.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a39aa70ce96b6c7c3dd1702100060702b90d6fe0ea8e617a123bec4b1c2f7cd9
BLAKE2b-256 checksum
How to use checksums
4673c8d40340de21cccbc0d5e08afdd1cd7d8a23126ddc6cb817c3e9dcd856db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for aiogram-nav 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiogram_nav-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page