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.2

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.2
File Size Uploaded
patpubrender-0.1.2.tar.gz 104.5 kB Details

Built distributions (wheels)

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

Download URL patpubrender-0.1.2.tar.gz
Size 104.5 kB
Tags Source
SHA-256 checksum
How to use checksums
757ca36fcf7c3c9050c26d35ad02405ac1e22337d6851c891dd886247137d83e
BLAKE2b-256 checksum
How to use checksums
7583f399980eb7b8703ddf4b48c2486af22ea473607e6cb9e3fa8e0fa858735d
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.2-cp39-abi3-win_amd64.whl

Download URL patpubrender-0.1.2-cp39-abi3-win_amd64.whl
Size 472.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1d3ff5af5cdce9efadc9f55937521b6aa3eb91d9ab94ba083cdf4d03e4c387ff
BLAKE2b-256 checksum
How to use checksums
fefc281af92173556848ddb1f20a3ab6edfcab815e2255097f52ca9a0b8eaa94
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.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL patpubrender-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 576.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ccc09bd91514678216d005e41aeabb2d87e0b896be1e7af124cef9b302b7f6c0
BLAKE2b-256 checksum
How to use checksums
566cd8c042539ce556597d15e32d4db495e67374446ff8b08c5db5122612f96f
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.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL patpubrender-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 530.9 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e4d5cc3e8ff9504274fca1bf7aefbed7978888d43f4d4752787b0a22c81c9b2c
BLAKE2b-256 checksum
How to use checksums
d3d4d77ade3ba5d0428dc1d340d45b9ace27c75915fb869b7c8e24af5530667f
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.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL patpubrender-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Size 510.8 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ceb1e0fbacde8a3baffdd6ebab97ff425de04bb27c2aaddc59d6a02c08fe302c
BLAKE2b-256 checksum
How to use checksums
a6fedd8850157fec914938c29e9984c8e7e2e6d3d094c1628a5c64acf259cd29
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.2-cp39-abi3-macosx_10_12_x86_64.whl

Download URL patpubrender-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 532.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
61c61efefbde05d217d5ed10158bd00a1cf1fdadf2a5f89b932869a65e2daa05
BLAKE2b-256 checksum
How to use checksums
c01cae03976c8034b863ceb16187c8b1934a74ce645ae632b6e4e157287cc6ef
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

This release

0.1.2 This release

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