Metadata-Version: 2.4
Name: pdfrender
Version: 0.1.0
Summary: Using DB models and Jinja2 to generate templated PDF documents
Author-email: Cam Ratchford <camratchford@gmail.com>
Project-URL: Homepage, https://github.com/camratchford/pdfrender
Project-URL: Source, https://github.com/camratchford/pdfrender
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: byoconfig
Requires-Dist: typer
Requires-Dist: jinja2
Requires-Dist: click
Requires-Dist: textual
Requires-Dist: pyyaml
Requires-Dist: sqlmodel
Requires-Dist: pydantic
Requires-Dist: markdown
Requires-Dist: pymdown-extensions
Requires-Dist: pygments
Requires-Dist: weasyprint
Provides-Extra: development
Requires-Dist: pytest; extra == "development"
Requires-Dist: pytest-cov; extra == "development"
Requires-Dist: isort; extra == "development"
Requires-Dist: ruff; extra == "development"
Requires-Dist: build; extra == "development"
Provides-Extra: docs
Requires-Dist: mkdocs~=1.6; extra == "docs"
Requires-Dist: mkdocs-autorefs~=1.4; extra == "docs"
Requires-Dist: mkdocs-get-deps~=0.2.2; extra == "docs"
Requires-Dist: mkdocs-material~=9.7; extra == "docs"
Requires-Dist: mkdocs-material-extensions~=1.3; extra == "docs"
Requires-Dist: mkdocstrings~=1.0; extra == "docs"
Requires-Dist: mkdocstrings-python~=2.0; extra == "docs"
Dynamic: license-file

# pdfrender

A database relationship and template-driven Markdown to PDF toolkit.

Bring your own SQLAlchemy/SQLModel models, YAML data, and Jinja2 templates.


- Type-aware model importing DB data from YAML. Supports nested instance data for dynamically assigning relationships.
- Facilities to perform DB queries inside the Jinja2 template context
- Custom Jinja2 Environment object:
   - Pre-processes templates to support typed variables, allowing template authors to specify variable types 
     using PEP 484 annotation syntax.
   - Stores undefined variables, allowing for run-time user variable prompts
- Dynamically composed Textual CLI form, to capture run-time user variable inputs 

## Documentation

Published at https://camratchford.github.io/pdfrender/ (deployed on release,
see below). To view locally instead:

```bash
pip install -e ".[docs]"
mkdocs serve -f extras/docs/mkdocs.yml
```

Then open http://127.0.0.1:8000.

## Releasing

The package version comes from git tags via `setuptools-scm` - there's
nothing to bump by hand in `pyproject.toml`. To cut a release:

```bash
git tag v0.1.0
git push --tags
```

Pushing a `v*` tag triggers `.github/workflows/release.yml`, which builds
the package and publishes it to PyPI (via
[trusted publishing](https://docs.pypi.org/trusted-publishers/), no stored
token needed), and deploys `extras/docs` to GitHub Pages.

One-time setup this repo needs before that works:

- **PyPI**: add a trusted publisher on the
  [pdfrender PyPI project](https://pypi.org/manage/project/pdfrender/publishing/)
  pointing at this repo and the `release.yml` workflow.
- **GitHub Pages**: under Settings -> Pages, set Source to "GitHub Actions".
