Skip to main content

Simple markdown/html report templating with loops, tables, lists, media, slots, Pydantic and SQLAlchemy.

Project description

relator

Шаблоны Markdown/HTML для отчётов: таблицы, списки, циклы %%len=%%, слоты @@...@@, медиа (Pillow, matplotlib), опционально Pydantic и SQLAlchemy.

Установка

pip install relator
pip install "relator[integrations]"

Импорт

from relator import Template

t = Template("template.md", assets_dir="assets")
t.data(["title", "Заголовок"])
t.compile("out.md")

Документация

docs/GUIDE.md — синтаксис, API, пример шаблон + код.

prototyping/example/99_full_reference/ — длинный шаблон и скрипт сборки.

Остальные сценарии: prototyping/example/README.md.

CLI

relator --template template.md --inspect
relator --template template.md --context ctx.json --output report.md

Релиз на PyPI

python -m build
twine check dist/*
twine upload dist/*

Версию меняйте в pyproject.toml. Токен PyPI храните только в переменных окружения или в CI, не в репозитории.

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

relator-1.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

relator-1.2.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file relator-1.2.0.tar.gz.

File metadata

  • Download URL: relator-1.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for relator-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a5749b05945a58fea9ff125298d500c4e281893f06ae0162ffc24bed92ce2903
MD5 50e45237460dfdaabac40b956d9eabdf
BLAKE2b-256 0223c08455b2c6263f04ccc2262a837a0a159bd048ee9516cb2f406120dffb76

See more details on using hashes here.

File details

Details for the file relator-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: relator-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for relator-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e575c26db68a89f9d7ed1467deefec5225c3b2f10b44ad10f1fe524509cf861
MD5 097a500df2504a5cbdd1002a4234e831
BLAKE2b-256 59f23ff09f6ac99355e339ffa32e8911fbde2b3e57e7cb8917b59ad5094b658b

See more details on using hashes here.

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