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

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.0
File Size Uploaded
patpubrender-0.2.0.tar.gz 115.5 kB Details

Built distributions (wheels)

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

Download URL patpubrender-0.2.0.tar.gz
Size 115.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2857889bd029252e48602136612bed6788f36e2f9367e4940391f4cae11cb09a
BLAKE2b-256 checksum
How to use checksums
980483bd3e4dab7bcbefbe95b47bd12c6d47bb66af32cfbb3b5a5e92e174d735
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 Jul 6, 2026.

Transparency log

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

Download URL patpubrender-0.2.0-cp39-abi3-win_amd64.whl
Size 475.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
85c13f6738c9faef8e45553157b325e8cb328024c8ff9ead43062c0a18d6277b
BLAKE2b-256 checksum
How to use checksums
d1f13bfb082dba118c51e274ee510d1a181510242424d9159cca0666ce6468b6
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 Jul 6, 2026.

Transparency log

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

Download URL patpubrender-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 580.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b2973cd83be1f4880d24b5173b09c8e0ca6ce95d833be49ca1685ad9578defb5
BLAKE2b-256 checksum
How to use checksums
6308ef4f503ba169e51376e0f63c0b8340e8de978cc646906c64835b1ede3ef8
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 Jul 6, 2026.

Transparency log

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

Download URL patpubrender-0.2.0-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
c7d25e733a7e4df9501a18e9a76f7d00173766d976884e714d00563ba272588a
BLAKE2b-256 checksum
How to use checksums
4fe2b9517fab22947a3449bcfeefb3e18e73d7edc9b4c8c7c175c8ae011ea1c2
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 Jul 6, 2026.

Transparency log

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

Download URL patpubrender-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 514.4 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ef2454b240c09f169724cd4246b640f3683c7c77faca9e079d809ed1a6cca4d3
BLAKE2b-256 checksum
How to use checksums
9caac7c6edb7d5ab5b6822e326ab3213ba0e268aff942dbeff470256445710bc
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 Jul 6, 2026.

Transparency log

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

Download URL patpubrender-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 535.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d3f2600be78bf663713349cd7574a68d18a9ac9fa44c86980bcd22d349ef4fa6
BLAKE2b-256 checksum
How to use checksums
cba051ce8e86eab16d8b879f2a4228f3c3c8a1f6143a1d74f8713887c306be03
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 Jul 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

6 release files

This release

0.2.0 This release

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