Skip to main content

patpubrender

A Python extension for patpubrender: parse USPTO patent grant and application XML into a document object, and render Markdown. The implementation is Rust, compiled to a native extension.

pip install patpubrender

Usage

import patpubrender

xml = open("US12345678.xml").read()

# render
md = patpubrender.parse_to_markdown(xml)
md = patpubrender.parse_to_markdown(xml, template="{{title}}\n\n{{claims}}")

# document object
doc = patpubrender.parse(xml)
doc.publication_number     # str | None
doc.title                  # str | None
doc.inventors              # list[str]
doc.claims[0].number       # int
doc.claims[0].text         # str
doc.abstract_text          # str | None
doc.to_markdown()          # str

patpubrender.detect_format(xml)   # "UsptoGrantV47"

Unrecognized or malformed input raises ValueError.

Templates

to_markdown and parse_to_markdown take an optional template: text with {{frontmatter}}, {{title}}, {{abstract}}, {{description}}, and {{claims}} placeholders. Each expands to a complete block, heading included. The template fixes order and surrounding text.

License

Apache 2.0.

Metadata

Release files for patpubrender 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patpubrender 0.1.1
File Size Uploaded
patpubrender-0.1.1.tar.gz 104.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for patpubrender 0.1.1
File
patpubrender-0.1.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
patpubrender-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
patpubrender-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
patpubrender-0.1.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
patpubrender-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 2.7 MB

Release files / patpubrender-0.1.1.tar.gz

Download URL patpubrender-0.1.1.tar.gz
Size 104.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9a10b9280632ddd4e38e777f63f95c53053d82d0a126a752aed1150a878cda8b
BLAKE2b-256 checksum
How to use checksums
38832f83c55bf815d071dc7804110475fc207c3b143de22c2b3514191fe4442f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / patpubrender-0.1.1-cp39-abi3-win_amd64.whl

Download URL patpubrender-0.1.1-cp39-abi3-win_amd64.whl
Size 472.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fbd5e3f2b841e12caa215a7dfab2ff341dfe383612cc5d90d866d6c33747735e
BLAKE2b-256 checksum
How to use checksums
240064ed2ee34b8f67ba23888220141acbc8e38f5773b6bdfae4d49fdd36eb62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / patpubrender-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL patpubrender-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 576.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
562078a6a35853d67c7a9cabec2838be4e3aa5d57cce4216ba3c37b368c6effb
BLAKE2b-256 checksum
How to use checksums
405644f710018effbfefd6da43908fa611504b01cb06a495cee4cbfd2bd4a70c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / patpubrender-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL patpubrender-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 530.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
87a9f5f27c15c89cbd9fa0a268f36f3693b3d75871d2572d599b06b6be090a6e
BLAKE2b-256 checksum
How to use checksums
b8ad278cd638e13cbcd161056a53fd30cdde92a88e5321e7111406fd11a89c7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / patpubrender-0.1.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL patpubrender-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Size 510.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2b9e9ddff9615e4e2aaa21685593c6bf7d9b45365ed19d15bb3ba280a9947f96
BLAKE2b-256 checksum
How to use checksums
f679b028aea208d7116d21288b6fbd91477fd5317d7e73643ba423177681454a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / patpubrender-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL patpubrender-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 531.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2dd679dcf92536a90d1d1aa9fcab9af6ea3a033ade40bf22a1d0b47f96967a96
BLAKE2b-256 checksum
How to use checksums
163e285231adabf686a371be7fe997640d77e40c86830a332d7badf3b6e091fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

6 release files

0.2.0

6 release files

0.1.2

6 release files

This release

0.1.1 This release

6 release files

0.1.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page