Metadata-Version: 2.4
Name: relator
Version: 1.3.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

```
 ______________________  
|______________________| 
   |________________|    
 .-'                '-.  
(26)================(05) 
  |  ||  ||  ||  ||  |   
  |  ||  ||  ||  ||  |      111111111       1111111111    111            33333333       33333333333      00000000      00000000
  |  ||  ||  ||  ||  |      11       11     1        1    1 1           33       3      3         3     00      00     00      00
  |  ||  ||  ||  ||  |      11 1111   1     1  1111111    1 1           3  3333  3      3333   3333     0  0000  0     00 0000  0
  |  ||  ||  ||  ||  |      11 1  1   1     1  1          1 1           3  3   3  3        3   3        0  0  0  0     00 0  0  0
  |  ||  ||  ||  ||  |      11 1111   1     1  11111      1 1           3  3333   3        3   3        0  0  0  0     00 0000  0
  |  ||  ||  ||  ||  |      11       11     1      1      1 1           3         3        3   3        0  0  0  0     00      00
  |  ||  ||  ||  ||  |      11 111 11       1  11111      1 1           3   3333  3        3   3        0  0  0  0     00 000 00
  |  ||  ||  ||  ||  |      11 1 11  1      1  1          1 1           3  3   3  3        3   3        0  0  0  0     00  0 00  0
  |  ||  ||  ||  ||  |      11 1   1  1     1  1111111    1 1111111     3  3   3  3        3   3        0  0000  0     00  0   0  0
  |  ||  ||  ||  ||  |      11 1     1      1        1    1 1     1     3  3   3  3        3   3        00      00     00  0     0 
  |  ||  ||  ||  ||  |      1111     1111   1111111111    111111111     3333   3333        33333         00000000      00000     0000
   |________________|    
  |__________________|   
 |____________________|  
|______________________| 
| |||||||||||||||||||| |     --------------------------------------------------------------------------------------
|______________________| 
                                                   TEMPLATES      ▪      DATA      ▪      REPORTS
```


Шаблоны Markdown/HTML для отчётов: таблицы, списки, циклы `%%len=%%`, секции `%%render%%`, дерево `[[TREE]]`, JSON `[[JSON]]`, слоты `@@...@@`, медиа (Pillow, matplotlib), сохранение контекста при `compile` и `inject`, опционально 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, не в репозитории.
