Skip to main content

Python bindings for Quillmark - format-first Markdown rendering

Project description

Quillmark — Python bindings

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

Maintained by TTQ.

Installation

pip install quillmark

Quick Start

from quillmark import Quillmark, Document, OutputFormat

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

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

# Hello
"""

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

# Round-trip: mutate, emit, re-parse
parsed.set_field("title", "Updated")
emitted = parsed.to_markdown()
reparsed = Document.from_markdown(emitted)
assert reparsed.frontmatter["title"] == "Updated"

API Overview

Quillmark

engine = Quillmark()
engine.registered_backends()      # ['typst']
quill = engine.quill_from_path("path/to/quill")

Quill

quill = engine.quill_from_path("path")
result = quill.render(parsed, OutputFormat.PDF)
session = quill.open(parsed)
quill.dry_run(parsed)

Document

doc = Document.from_markdown(markdown)
emitted = doc.to_markdown()          # canonical Quillmark Markdown

# Versioned storage DTO — use this to persist a document across a
# process restart or crate upgrade. The wire format is frozen per
# schema version, whereas Markdown syntax evolves.
stored = doc.to_json()               # JSON string carrying a schema version
restored = Document.from_json(stored)
assert restored.to_markdown() == doc.to_markdown()

from_json raises ParseError on malformed JSON or an unknown schema tag. A DTO-reconstructed document has no parse-time warnings.

Development

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

License

Apache-2.0

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quillmark-0.81.0rc2.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

quillmark-0.81.0rc2-cp310-abi3-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

quillmark-0.81.0rc2-cp310-abi3-macosx_11_0_arm64.whl (13.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file quillmark-0.81.0rc2.tar.gz.

File metadata

  • Download URL: quillmark-0.81.0rc2.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quillmark-0.81.0rc2.tar.gz
Algorithm Hash digest
SHA256 c851e07483375a786ffc83b624de3b12c0fe30e33e2cdd2e3d87ca4aa32b50b2
MD5 471de69185712be65f71f9fb23e5ed19
BLAKE2b-256 47bd9a513e1c71efc32d36d5bf5a78cae5a714332f8c68bb2a35ceb6b8efd061

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillmark-0.81.0rc2.tar.gz:

Publisher: release.yml on quillmark-org/quillmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quillmark-0.81.0rc2-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for quillmark-0.81.0rc2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a55d43804ac46dad1afa49fed0e3166c3c8e1532411798a686b7232eba571bbb
MD5 84794e9d81df6e805c2b15115c273f9b
BLAKE2b-256 be7d6ab9dbf31de83d2f6aa57d8429c4136b4fcf4d8d9ae74314886d0f9d2f6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillmark-0.81.0rc2-cp310-abi3-win_amd64.whl:

Publisher: release.yml on quillmark-org/quillmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 378d364b69d950306658e0f6a60af6e6ef840376aa91182244f2a8ef7cd9b732
MD5 53c3e151fd1330f6498a51ae3c7cd573
BLAKE2b-256 3aaba47b8641e805abb3d18de85bfbe9e22523a8343fa226def4ca225b789358

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on quillmark-org/quillmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ea9ce7b0c448da5e329bb4fea9694c42d79352f5234cb607531165a43aaefce2
MD5 82fa541e10bfeb90a07ff6aaeabf5652
BLAKE2b-256 f00be13c8a805497397181baf71dd93457c2ce9b71c7f60974b76d7d14dd7fff

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillmark-0.81.0rc2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on quillmark-org/quillmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quillmark-0.81.0rc2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quillmark-0.81.0rc2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02bcf28826f24d5b28b1bbf71b8635fa6476c3a2c026188eb2b17121cc23fcd7
MD5 232170d267149220fbd18c9479f8e0df
BLAKE2b-256 87120b202d7ad6b80b4ad2263fcc31a7ee2418967c7aebbd12c31b1eb9487287

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillmark-0.81.0rc2-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on quillmark-org/quillmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page