quillmark 0.1.20__cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.4.0__cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.4
2
+ Name: quillmark
3
+ Version: 0.4.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: Apache Software License
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Rust
13
+ Classifier: Topic :: Text Processing :: Markup
14
+ Requires-Dist: pytest>=8.0 ; extra == 'dev'
15
+ Requires-Dist: pytest-cov>=5.0 ; extra == 'dev'
16
+ Requires-Dist: maturin>=1.7,<2.0 ; extra == 'dev'
17
+ Provides-Extra: dev
18
+ Summary: Python bindings for Quillmark - template-first Markdown rendering
19
+ Keywords: markdown,pdf,typst,rendering,templates
20
+ Author: Quillmark Contributors
21
+ License: Apache-2.0
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
+ Project-URL: Homepage, https://github.com/nibsbin/quillmark
25
+ Project-URL: Repository, https://github.com/nibsbin/quillmark
26
+
27
+ # Quillmark — Python bindings for Quillmark
28
+
29
+ Python bindings for the Quillmark template-first Markdown rendering engine.
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ pip install quillmark
35
+ ```
36
+
37
+ ## Quick Start
38
+
39
+ ```python
40
+ from quillmark import Quillmark, Quill, ParsedDocument, OutputFormat
41
+
42
+ # Create engine
43
+ engine = Quillmark()
44
+
45
+ # Load and register a quill
46
+ quill = Quill.from_path("path/to/quill")
47
+ engine.register_quill(quill)
48
+
49
+ # Parse markdown
50
+ markdown = """---
51
+ QUILL: my_quill
52
+ title: Hello World
53
+ ---
54
+
55
+ # Hello
56
+
57
+ This is a test document.
58
+ """
59
+ parsed = ParsedDocument.from_markdown(markdown)
60
+
61
+ # Create workflow and render
62
+ workflow = engine.workflow_from_parsed(parsed) # Infers quill from QUILL tag
63
+ result = workflow.render(parsed, OutputFormat.PDF)
64
+
65
+ # Save output
66
+ result.artifacts[0].save("output.pdf")
67
+ ```
68
+
69
+ ## API Overview
70
+
71
+ The Python API provides opinionated visibility over the rendering workflow:
72
+
73
+ 1. **Load Quill** - Load template bundles from the filesystem
74
+ 2. **Parse Markdown** - Parse Markdown with YAML frontmatter into `ParsedDocument`
75
+ 3. **Inspect Quill** - Retrieve quill properties (metadata, field schemas, supported formats)
76
+ 4. **Create Workflow** - Build a rendering pipeline from quill or parsed document
77
+ 5. **Render** - Generate output artifacts with configurable options
78
+
79
+ ### Core Classes
80
+
81
+ #### `Quillmark` - Engine
82
+
83
+ Manages backends and quills.
84
+
85
+ ```python
86
+ engine = Quillmark()
87
+ engine.register_quill(quill)
88
+ engine.registered_backends() # ['typst']
89
+ engine.registered_quills() # ['my_quill']
90
+
91
+ # Create workflows
92
+ workflow = engine.workflow_from_parsed(parsed) # Infer from QUILL tag
93
+ workflow = engine.workflow_from_quill_name("name") # By name
94
+ workflow = engine.workflow_from_quill(quill) # By object
95
+ ```
96
+
97
+ #### `Quill` - Template Bundle
98
+
99
+ Represents a quill loaded from the filesystem.
100
+
101
+ ```python
102
+ quill = Quill.from_path("path/to/quill")
103
+
104
+ # Properties
105
+ quill.name # Quill name
106
+ quill.backend # Backend identifier (e.g., "typst")
107
+ quill.glue_template # Template content
108
+ quill.example # Example markdown content
109
+ quill.metadata # Quill metadata dict
110
+ quill.field_schemas # Field documentation dict
111
+ quill.supported_formats() # [OutputFormat.PDF, OutputFormat.SVG]
112
+ ```
113
+
114
+ #### `ParsedDocument` - Parsed Markdown
115
+
116
+ Represents parsed Markdown with frontmatter.
117
+
118
+ ```python
119
+ parsed = ParsedDocument.from_markdown(markdown)
120
+
121
+ parsed.body() # Document body
122
+ parsed.quill_tag() # QUILL field value (if present)
123
+ parsed.get_field(key) # Get specific field
124
+ parsed.fields # All frontmatter fields
125
+ ```
126
+
127
+ #### `Workflow` - Rendering Pipeline
128
+
129
+ Sealed workflow for rendering.
130
+
131
+ ```python
132
+ workflow = engine.workflow_from_quill_name("my_quill")
133
+
134
+ # Render
135
+ result = workflow.render(parsed, OutputFormat.PDF)
136
+
137
+ # Query properties
138
+ workflow.quill_name # "my_quill"
139
+ workflow.backend_id # "typst"
140
+ workflow.supported_formats # [OutputFormat.PDF, OutputFormat.SVG]
141
+
142
+ # Process glue only (no compilation)
143
+ glue_output = workflow.process_glue_parsed(parsed)
144
+ ```
145
+
146
+ #### `RenderResult` - Output Container
147
+
148
+ Contains rendered artifacts and diagnostics.
149
+
150
+ ```python
151
+ result = workflow.render(parsed, OutputFormat.PDF)
152
+
153
+ for artifact in result.artifacts:
154
+ print(f"Format: {artifact.output_format}")
155
+ print(f"Size: {len(artifact.bytes)} bytes")
156
+ artifact.save("output.pdf")
157
+
158
+ for warning in result.warnings:
159
+ print(f"{warning.severity}: {warning.message}")
160
+ ```
161
+
162
+ ## Examples
163
+
164
+ See the [examples/](examples/) directory for complete examples:
165
+
166
+ - [`workflow_demo.py`](examples/workflow_demo.py) - Full workflow demonstration
167
+ - [`basic.py`](examples/basic.py) - Basic rendering example
168
+ - [`batch.py`](examples/batch.py) - Batch processing example
169
+
170
+ ## Development
171
+
172
+ This repository uses `uv` for local development (https://astral.sh/uv).
173
+
174
+ Install uv (one-time):
175
+
176
+ ```zsh
177
+ curl -LsSf https://astral.sh/uv/install.sh | sh
178
+ ```
179
+
180
+ Canonical development flow:
181
+
182
+ ```zsh
183
+ # Create virtual environment
184
+ uv venv
185
+
186
+ # Install developer extras (includes maturin, pytest, mypy, ruff)
187
+ uv pip install -e "[dev]"
188
+
189
+ # Build and install (compile Rust + install into venv)
190
+ uv run python -m maturin develop
191
+
192
+ # Run tests
193
+ uv run pytest
194
+ ```
195
+
196
+ ### Alternative: Without uv
197
+
198
+ ```bash
199
+ # Create venv
200
+ python3 -m venv venv
201
+ source venv/bin/activate
202
+
203
+ # Install dependencies
204
+ pip install maturin pytest
205
+
206
+ # Build and install
207
+ maturin develop
208
+
209
+ # Run tests
210
+ pytest
211
+ ```
212
+
213
+ ## License
214
+
215
+ Apache-2.0
@@ -0,0 +1,7 @@
1
+ quillmark-0.4.0.dist-info/METADATA,sha256=tHfLHrN9acoLuIXW5iJHY_8PsxUYp2TIuJkJd5Sv-Bk,5493
2
+ quillmark-0.4.0.dist-info/WHEEL,sha256=sHl2MPySRQtLBS4t9I9tl1bAeFFBhTGABHYdwnegkVM,130
3
+ quillmark/__init__.py,sha256=VKjY9Z1Tp-A08MRByFMMAyqsDbUUfRCAYlYslRJbFQQ,606
4
+ quillmark/__init__.pyi,sha256=vNYAE33LkmV8w_LBFwYyU_F41pG6ymM7OmFMHXbcjOk,6509
5
+ quillmark/_quillmark.abi3.so,sha256=0zJTCuw8zJfCdqH-gn5TkgUA5VsqFbteQcwpUqzvRvM,16627896
6
+ quillmark/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ quillmark-0.4.0.dist-info/RECORD,,
@@ -1,119 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: quillmark
3
- Version: 0.1.20
4
- Classifier: Development Status :: 4 - Beta
5
- Classifier: Intended Audience :: Developers
6
- Classifier: License :: OSI Approved :: Apache Software License
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.10
9
- Classifier: Programming Language :: Python :: 3.11
10
- Classifier: Programming Language :: Python :: 3.12
11
- Classifier: Programming Language :: Python :: 3.13
12
- Classifier: Programming Language :: Rust
13
- Classifier: Topic :: Text Processing :: Markup
14
- Requires-Dist: pytest>=8.0 ; extra == 'dev'
15
- Requires-Dist: pytest-cov>=5.0 ; extra == 'dev'
16
- Requires-Dist: maturin>=1.7,<2.0 ; extra == 'dev'
17
- Provides-Extra: dev
18
- Summary: Python bindings for Quillmark - template-first Markdown rendering
19
- Keywords: markdown,pdf,typst,rendering,templates
20
- Author: Quillmark Contributors
21
- License: Apache-2.0
22
- Requires-Python: >=3.10
23
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
- Project-URL: Homepage, https://github.com/nibsbin/quillmark
25
- Project-URL: Repository, https://github.com/nibsbin/quillmark
26
-
27
- # Quillmark — Python bindings for Quillmark
28
-
29
- Compact docs and canonical developer workflow.
30
-
31
- Installation
32
- ------------
33
-
34
- ```bash
35
- pip install quillmark
36
- ```
37
-
38
- Quick start
39
- -----------
40
-
41
- ```python
42
- from quillmark import Quillmark, ParsedDocument, OutputFormat
43
-
44
- engine = Quillmark()
45
- parsed = ParsedDocument.from_markdown("# Hello")
46
- workflow = engine.workflow_from_quill_name("my-quill")
47
- workflow.render(parsed, OutputFormat.PDF).artifacts[0].save("out.pdf")
48
- ```
49
-
50
- Development (opinionated)
51
- -------------------------
52
-
53
- This repository standardizes on `uv` for local development (https://astral.sh/uv). Use the commands below on macOS (zsh).
54
-
55
- Install uv (one-time):
56
-
57
- ```zsh
58
- curl -LsSf https://astral.sh/uv/install.sh | sh
59
- ```
60
-
61
- Canonical flow:
62
-
63
- ```zsh
64
- # create the uv-managed venv
65
- uv venv
66
-
67
- # install developer extras (includes maturin, pytest, mypy, ruff)
68
- uv pip install -e "[dev]"
69
-
70
- # Change to release for production builds
71
- # uv pip install -e ".[dev]" --release
72
-
73
- # develop-install (compile + install into the venv)
74
- uv run python -m maturin develop
75
-
76
- # run tests
77
- uv run pytest
78
- ```
79
-
80
- Notes
81
- - `maturin` builds the PyO3 extension; `uv` manages the virtualenv and command execution.
82
- - Ensure Rust (rustup) and macOS command-line tools are installed when building.
83
-
84
- License
85
- -------
86
-
87
- Apache-2.0
88
-
89
-
90
- Building
91
- ---------------------
92
-
93
- If you prefer an opinionated, reproducible Python workflow the project designs recommend `uv` (https://astral.sh/uv). `uv` provides a small wrapper for creating venvs and running common commands. These commands are equivalent to the venv/maturin flow above but shorter.
94
-
95
- Install uv (one-time):
96
-
97
- ```zsh
98
- curl -LsSf https://astral.sh/uv/install.sh | sh
99
- ```
100
-
101
- Typical workflow with `uv`:
102
-
103
- ```zsh
104
- # create a venv and activate it
105
- uv venv
106
-
107
- # Build in debug mode (faster, suitable for development)
108
- uv pip install -e ".[dev]"
109
-
110
- # Build in release mode (slower, suitable for production)
111
- uv run python -m maturin develop --release
112
-
113
- # run the test suite
114
- uv run pytest
115
-
116
- # run mypy and ruff checks (project recommends these)
117
- uv run mypy python/quillmark
118
- uv run ruff check python/
119
- ```
@@ -1,7 +0,0 @@
1
- quillmark-0.1.20.dist-info/METADATA,sha256=fzeHkZMyVLBPWp6UoeqsVw8zs2w0gtVpiQbsv1TgQn4,3174
2
- quillmark-0.1.20.dist-info/WHEEL,sha256=sHl2MPySRQtLBS4t9I9tl1bAeFFBhTGABHYdwnegkVM,130
3
- quillmark/__init__.py,sha256=VKjY9Z1Tp-A08MRByFMMAyqsDbUUfRCAYlYslRJbFQQ,606
4
- quillmark/__init__.pyi,sha256=vNYAE33LkmV8w_LBFwYyU_F41pG6ymM7OmFMHXbcjOk,6509
5
- quillmark/_quillmark.abi3.so,sha256=rM48orhrEEM8NhXOiFBgdxxQR74I_R9nBNk77YFWS9k,16279720
6
- quillmark/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- quillmark-0.1.20.dist-info/RECORD,,