Parse USPTO patent XML into a structured document and render Markdown.
Project description
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.
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patpubrender-0.1.0.tar.gz.
File metadata
- Download URL: patpubrender-0.1.0.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c983f0baec863ad0a813194e6bc8867be33d7092187c775e1330746a71c6e711
|
|
| MD5 |
389e934a7712570cc484d24f8902f64e
|
|
| BLAKE2b-256 |
8e0571f69a828e80753bb7138db894341208681c42123e484d3ebec65b9768a0
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0.tar.gz:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0.tar.gz -
Subject digest:
c983f0baec863ad0a813194e6bc8867be33d7092187c775e1330746a71c6e711 - Sigstore transparency entry: 1850508821
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file patpubrender-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: patpubrender-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 472.9 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1116fc5fd7c3fb2baf0190770ee05e553e62e414dfabc6c9d5ccdfe77aafab4
|
|
| MD5 |
63a7e3071563c012b1b8a59e786a2d58
|
|
| BLAKE2b-256 |
b56d9b764939fb69023b2abb1c53aab3f25cf30b3228a9375deb88bd556c79a4
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0-cp39-abi3-win_amd64.whl -
Subject digest:
a1116fc5fd7c3fb2baf0190770ee05e553e62e414dfabc6c9d5ccdfe77aafab4 - Sigstore transparency entry: 1850509380
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 576.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74be452f2331271782af4f46977c3d71283b78fbf95dc3f54ff590ef9fcb29bb
|
|
| MD5 |
ccc113b8a72dac8fb50e63709c45b704
|
|
| BLAKE2b-256 |
f53783bd3c895fb36be1e6ddcca1ec4330bd511d97d9ebf7aa29d84cdfbd0545
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
74be452f2331271782af4f46977c3d71283b78fbf95dc3f54ff590ef9fcb29bb - Sigstore transparency entry: 1850509089
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 530.5 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e59972eb9bc87410f6c49e2743245aa8b71ab91c0bb3b3888e5093a7ba3c2718
|
|
| MD5 |
87984af07d89a94c58994befe82303f2
|
|
| BLAKE2b-256 |
7bd7e00f760ab7408596b99a24f6b4f946b2589f78fb35374a272e3100c5e8c4
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
e59972eb9bc87410f6c49e2743245aa8b71ab91c0bb3b3888e5093a7ba3c2718 - Sigstore transparency entry: 1850509012
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 510.6 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af24ca1271f24e6932546f5c8fa4a8dd614f726ed2fcb97f4389608b153688d0
|
|
| MD5 |
e7280dacb6941766e52e430b2389708f
|
|
| BLAKE2b-256 |
c34d6e3cc4d1a55bb1337cee04ec2c84e92fcc3df01d2d1faea229b17c6c141c
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
af24ca1271f24e6932546f5c8fa4a8dd614f726ed2fcb97f4389608b153688d0 - Sigstore transparency entry: 1850509170
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 531.8 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
253b596b76ce6e344721a15c4f61549aecca9bad6205e00ce896511e98855e4b
|
|
| MD5 |
a4afac76c640dd0d8747947f1171f3b0
|
|
| BLAKE2b-256 |
23a5ce9773c66622ed21e1dfc57f68774e89103b772094c1ff81b002acddd073
|
Provenance
The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on jhnoel/patpubrender
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
253b596b76ce6e344721a15c4f61549aecca9bad6205e00ce896511e98855e4b - Sigstore transparency entry: 1850509267
- Sigstore integration time:
-
Permalink:
jhnoel/patpubrender@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jhnoel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eeb5f3df0fda96ec164d9a23892e52666e4067e3 -
Trigger Event:
push
-
Statement type: