Skip to main content

Production-grade Jinja2 UI rendering engine for aiogram with keyboard DSL and session sync

Project description

aiogram-jinja-ui

CI Release

Production-ready Jinja2 UI engine for aiogram with:

  • template-driven Telegram text rendering,
  • inline/reply keyboard DSL,
  • optional photo marker support,
  • sync manager for real-time UI updates across sessions.

EN

Features

  • TelegramUIEngine for rendering Jinja2 templates into Telegram-ready text + markup.
  • UIManager for synchronized UI updates (edit with resend fallback).
  • Keyboard DSL in templates via special comment blocks (TG_KB_START/TG_KB_END).
  • Strong fit for bots with dynamic dashboards, menus, and collaborative views.

Installation

poetry add aiogram-jinja-ui

Or from wheel:

pip install aiogram_jinja_ui-<version>-py3-none-any.whl

Minimal usage

from aiogram_jinja_ui import TelegramUIEngine

ui = TelegramUIEngine("templates")
text, markup, photo = ui.render(
    "pages/start.html",
    username="den5",
)

Versioning & releases

  • Use semantic tags: vMAJOR.MINOR.PATCH (example: v1.2.0).
  • CI workflow runs tests/build on push/PR.
  • Release workflow builds wheel+sdist and creates GitHub Release on tag push.
  • Optional PyPI publish is supported via PYPI_API_TOKEN secret.

Local development

poetry install --with dev
poetry run pytest -q
poetry build

RU

Возможности

  • TelegramUIEngine рендерит Jinja2-шаблоны в Telegram-текст и клавиатуры.
  • UIManager синхронизирует интерфейс между сессиями (с fallback на resend).
  • DSL для клавиатур через блоки TG_KB_START/TG_KB_END.
  • Подходит для сложных ботов: дашборды, меню, совместные экраны.

Установка

poetry add aiogram-jinja-ui

Или из wheel:

pip install aiogram_jinja_ui-<version>-py3-none-any.whl

Минимальный пример

from aiogram_jinja_ui import TelegramUIEngine

ui = TelegramUIEngine("templates")
text, markup, photo = ui.render(
    "pages/start.html",
    username="den5",
)

Версионирование и релизы

  • Используйте семантические теги: vMAJOR.MINOR.PATCH (например v1.2.0).
  • Workflow CI запускает тесты и сборку на push/PR.
  • Workflow Release публикует артефакты (wheel + sdist) в GitHub Releases по тегу.
  • Публикация в PyPI поддерживается через секрет PYPI_API_TOKEN.

Локальная разработка

poetry install --with dev
poetry run pytest -q
poetry build

GitHub quick start

git init
git add .
git commit -m "feat: production-ready packaging, README EN/RU, CI/release workflows"
git branch -M main
git remote add origin https://github.com/dEN5-tech/aiogram-jinja-ui.git
git push -u origin main

Create first release:

git tag v1.0.0
git push origin v1.0.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiogram_jinja_ui-1.0.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiogram_jinja_ui-1.0.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file aiogram_jinja_ui-1.0.3.tar.gz.

File metadata

  • Download URL: aiogram_jinja_ui-1.0.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiogram_jinja_ui-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8ab59d44a91684ed99f9f458cdd486d54b33baf3ef4babe96f63a3698ae838bb
MD5 11a8014f2846e3bd0dbe45624842fdff
BLAKE2b-256 a94afa5d123627ff3088b45511be3b650e722a191c6e7baa12eb3549a16cdc66

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiogram_jinja_ui-1.0.3.tar.gz:

Publisher: release.yml on dEN5-tech/aiogram-jinja-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiogram_jinja_ui-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aiogram_jinja_ui-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a86507a2cc026d71d3167524a5029e282d93b7adf4c1f588cbbd7121eb6c6ed
MD5 973b3b4463542713b7d74eccb3f03654
BLAKE2b-256 e3d843b5ed901501336b62ec87c745b192e1277c3f98e65a0cd46ffad9d827cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiogram_jinja_ui-1.0.3-py3-none-any.whl:

Publisher: release.yml on dEN5-tech/aiogram-jinja-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page