pyspoor
Typed Python adapter for spoor-core.
from spoor import parse_path
result = parse_path("report.pdf")
print(result.content.value.markdown)
for warning in result.warnings:
print(warning["code"], warning.get("location"))
Agents must inspect result.warnings; a successful parse can still report a
missing PDF text layer, suspicious text, merged-table degradation, or omitted
visuals.
Tables: narrowing and pagination
For CSV/XLSX, parse_bytes / parse_path accept the same narrowing options as
the CLI, so callers can page through full tables instead of the default
100-row preview:
from spoor import parse_bytes
# A slice by inclusive 1-based row range (mutually exclusive with limit/offset)
parse_bytes(data, source_name="data.xlsx", sheet="Sheet1", rows=(5, 104))
# Or paginate by limit/offset and keep only some columns
parse_bytes(data, source_name="data.xlsx", columns=["分类", "金额"], limit=100, offset=200)
PDFs: page ranges
For page-oriented PDFs, pass pages (inclusive 1-based) to parse only a slice
and avoid reading a large document end to end:
parse_path("report.pdf", pages=(1, 3)) # only pages 1–3
Extracting embedded media
Resolve a safe media URI emitted in the output (DOCX images, extractable PDF images) to raw bytes for handing to an external vision model:
from spoor import extract_media
image = extract_media(data, "spoor://docx/part/word/media/image1.png", source_name="report.docx")
Build locally with maturin develop.
Metadata
Release files for pyspoor 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyspoor-0.10.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| pyspoor-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| pyspoor-0.10.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| pyspoor-0.10.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.2 MB
Release files / pyspoor-0.10.0-cp39-abi3-win_amd64.whl
| Download URL | pyspoor-0.10.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
88747ce2e55efdf8de1c81a7dc7e07a66b5971f99d831dbe10443b0bc786a7b9
|
|
BLAKE2b-256 checksum How to use checksums |
9c658c73d0b7c2653cc8eb8dfaab215f8800913d634ad538786df9546f268c04
|
| 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 12, 2026.
Transparency logRelease files / pyspoor-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyspoor-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e3fbd816eace9d221b5b757058353d2c7e5e5128554febbcb9e12f68516198ee
|
|
BLAKE2b-256 checksum How to use checksums |
765433ee63d2752bb2d7a24aed84f086a31962a675ff90ab72f283b77cd8269b
|
| 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 12, 2026.
Transparency logRelease files / pyspoor-0.10.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pyspoor-0.10.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bd84ce2e6bb0cf7fbee90fe5dae2d0e054dc5c5d8e89bbffb8ce7c4bc5c9ce8c
|
|
BLAKE2b-256 checksum How to use checksums |
7ae433f259aa5219319f76f853593fdc22a799460473ea04f181676c0e13ade2
|
| 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 12, 2026.
Transparency logRelease files / pyspoor-0.10.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pyspoor-0.10.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
d649476943b1449bc981d643dc49598083feef4344e7c78ad75237115f0ea59d
|
|
BLAKE2b-256 checksum How to use checksums |
2fc3ea4d71c70ceb2780d8c83bb65ef38f1e5874b2911d5a7eee88779e46b269
|
| 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 12, 2026.
Transparency log