Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patpubrender-0.1.0.tar.gz (87.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

patpubrender-0.1.0-cp39-abi3-win_amd64.whl (472.9 kB view details)

Uploaded CPython 3.9+Windows x86-64

patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (576.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (530.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (510.6 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (531.8 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

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

Hashes for patpubrender-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c983f0baec863ad0a813194e6bc8867be33d7092187c775e1330746a71c6e711
MD5 389e934a7712570cc484d24f8902f64e
BLAKE2b-256 8e0571f69a828e80753bb7138db894341208681c42123e484d3ebec65b9768a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for patpubrender-0.1.0.tar.gz:

Publisher: release.yml on jhnoel/patpubrender

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for patpubrender-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a1116fc5fd7c3fb2baf0190770ee05e553e62e414dfabc6c9d5ccdfe77aafab4
MD5 63a7e3071563c012b1b8a59e786a2d58
BLAKE2b-256 b56d9b764939fb69023b2abb1c53aab3f25cf30b3228a9375deb88bd556c79a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for patpubrender-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on jhnoel/patpubrender

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for patpubrender-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74be452f2331271782af4f46977c3d71283b78fbf95dc3f54ff590ef9fcb29bb
MD5 ccc113b8a72dac8fb50e63709c45b704
BLAKE2b-256 f53783bd3c895fb36be1e6ddcca1ec4330bd511d97d9ebf7aa29d84cdfbd0545

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for patpubrender-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e59972eb9bc87410f6c49e2743245aa8b71ab91c0bb3b3888e5093a7ba3c2718
MD5 87984af07d89a94c58994befe82303f2
BLAKE2b-256 7bd7e00f760ab7408596b99a24f6b4f946b2589f78fb35374a272e3100c5e8c4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for patpubrender-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af24ca1271f24e6932546f5c8fa4a8dd614f726ed2fcb97f4389608b153688d0
MD5 e7280dacb6941766e52e430b2389708f
BLAKE2b-256 c34d6e3cc4d1a55bb1337cee04ec2c84e92fcc3df01d2d1faea229b17c6c141c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for patpubrender-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 253b596b76ce6e344721a15c4f61549aecca9bad6205e00ce896511e98855e4b
MD5 a4afac76c640dd0d8747947f1171f3b0
BLAKE2b-256 23a5ce9773c66622ed21e1dfc57f68774e89103b772094c1ff81b002acddd073

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page