Metadata-Version: 2.4
Name: quillmark
Version: 0.58.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Rust
Classifier: Topic :: Text Processing :: Markup
Requires-Dist: pytest>=8.0 ; extra == 'dev'
Requires-Dist: maturin>=1.7,<2.0 ; extra == 'dev'
Provides-Extra: dev
Summary: Python bindings for Quillmark - format-first Markdown rendering
Keywords: markdown,pdf,typst,rendering,templates
Author: Quillmark Contributors
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/nibsbin/quillmark
Project-URL: Repository, https://github.com/nibsbin/quillmark

# Quillmark — Python bindings

Python bindings for Quillmark's format-first Markdown rendering engine.

Maintained by [TTQ](https://tonguetoquill.com).

## Installation

```bash
pip install quillmark
```

## Quick Start

```python
from quillmark import Quillmark, ParsedDocument, OutputFormat

engine = Quillmark()
quill = engine.quill_from_path("path/to/quill")

markdown = """---
QUILL: my_quill
title: Hello World
---

# Hello
"""

parsed = ParsedDocument.from_markdown(markdown)
result = quill.render(parsed, OutputFormat.PDF)
result.artifacts[0].save("output.pdf")
```

## API Overview

### `Quillmark`

```python
engine = Quillmark()
engine.registered_backends()      # ['typst']
quill = engine.quill_from_path("path/to/quill")
workflow = engine.workflow(quill) # for dynamic assets/fonts
```

### `Quill`

```python
quill = engine.quill_from_path("path")
result = quill.render(markdown_or_parsed, OutputFormat.PDF)
```

### `Workflow`

Use workflow when adding dynamic assets/fonts:

```python
workflow = engine.workflow(quill)
workflow.add_asset("logo.png", logo_bytes)
workflow.add_font("Custom.ttf", font_bytes)
result = workflow.render(parsed, OutputFormat.PDF)
```

## Development

```bash
uv venv
uv pip install -e ".[dev]"
uv run pytest
```

## License

Apache-2.0

