Metadata-Version: 2.4
Name: relator
Version: 1.2.0
Summary: Simple markdown/html report templating with loops, tables, lists, media, slots, Pydantic and SQLAlchemy.
Author: reporting maintainers
License: MIT
Project-URL: Homepage, https://github.com/threenebula23/Relator
Project-URL: Repository, https://github.com/threenebula23/Relator
Project-URL: Documentation, https://github.com/threenebula23/Relator/blob/master/reporting/docs/GUIDE.md
Keywords: report,template,markdown,html,pydantic,sqlalchemy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich
Requires-Dist: pillow
Requires-Dist: matplotlib
Provides-Extra: pydantic
Requires-Dist: pydantic>=2; extra == "pydantic"
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy>=2; extra == "sqlalchemy"
Provides-Extra: integrations
Requires-Dist: pydantic>=2; extra == "integrations"
Requires-Dist: sqlalchemy>=2; extra == "integrations"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pydantic>=2; extra == "dev"
Requires-Dist: sqlalchemy>=2; extra == "dev"
Dynamic: license-file

# relator

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

## Установка

```bash
pip install relator
pip install "relator[integrations]"
```

## Импорт

```python
from relator import Template

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

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

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

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

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

## CLI

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

## Релиз на PyPI

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

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