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.2.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.2.1
File Size Uploaded
patpubrender-0.2.1.tar.gz 116.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for patpubrender 0.2.1
File
patpubrender-0.2.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
patpubrender-0.2.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.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
patpubrender-0.2.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
patpubrender-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 2.8 MB

Release files / patpubrender-0.2.1.tar.gz

Download URL patpubrender-0.2.1.tar.gz
Size 116.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7dc7c4daae785a2b2fbbcc54bc67e383709123f4b2d8e715ee18eef631cf5b98
BLAKE2b-256 checksum
How to use checksums
da3ca1abfa8f3caa5f3b852d7e7bb5b212a803806870587564b689c60e5f1c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

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

Download URL patpubrender-0.2.1-cp39-abi3-win_amd64.whl
Size 475.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
42ebb37119e7ff4b79680ee128b4733a59dd0b8dc16eee780a66c8827d65957f
BLAKE2b-256 checksum
How to use checksums
0e3a9a0c6218e2e2edbf39c6a4afd40a7061b50c1416077d2b45dc0e2a493ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

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

Download URL patpubrender-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 580.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9374abe67a48a135b3c5aaff06053bf6f671eae2e01f11454c624f667bdb6c49
BLAKE2b-256 checksum
How to use checksums
ac2beb0d9b3fde017405f0d7c33b968f74708d2a1e7eaac150bd165dcda5a3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

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

Download URL patpubrender-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 535.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
7ed79a4add44ed0b407b98912957e0b951bf191d074979c9c012bd4bb10e9821
BLAKE2b-256 checksum
How to use checksums
501eb4497004465d65bfaaeca5adb474f3956518d922f39b2718eb7a34568b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

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

Download URL patpubrender-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 514.2 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ae8e2476ec7d8d687f3594f6a811d30615dd8a65560ed4e223a24f50b2eba956
BLAKE2b-256 checksum
How to use checksums
0ef9100dc2bb9af6535a0e3f885e6c08e1d130a1436db92e599bd4e0f9de5a56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

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

Download URL patpubrender-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 536.0 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
27303f42ce3cfc7f8a9f60c63682dfe65ea429a57e165ebc33a5220ae4d65028
BLAKE2b-256 checksum
How to use checksums
ad8e357f015becc7813421843e135723ec4d0e1f0a1e7d8cfb8951e9868fc599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

6 release files

0.2.0

6 release files

0.1.2

6 release files

0.1.1

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