Skip to main content

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyspoor 0.12.0
File
pyspoor-0.12.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
pyspoor-0.12.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.12.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
pyspoor-0.12.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.4 MB

Release files / pyspoor-0.12.0-cp39-abi3-win_amd64.whl

Download URL pyspoor-0.12.0-cp39-abi3-win_amd64.whl
Size 1.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2e9c42879c2307537e587c639b90326dd63d34b26ef01ea3b62202fb8c4211a3
BLAKE2b-256 checksum
How to use checksums
9cc9080b78a98997a34d25ce2b3963a4fbe54418d346a615786b6be72e440fc1
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

Release files / pyspoor-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyspoor-0.12.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.7 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4b73375f1b45acf7844b548bce5f4cf7084a8199e4a11b9463d6ab02468cf226
BLAKE2b-256 checksum
How to use checksums
56d502f864fe72ee9b74a9a380ee0c3f0d6012046143c4528e3403caccb36036
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

Release files / pyspoor-0.12.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pyspoor-0.12.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a785bba8f82e98036793638d0c82a1847533c472dc1f25d7b761451b8beff07a
BLAKE2b-256 checksum
How to use checksums
947a53d197334a9db4b766f4d1a9dd3baf5fbb541519621f82d2e4b2e9fd9a63
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

Release files / pyspoor-0.12.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pyspoor-0.12.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
5f1af38ed2a654818d69a2b44fcfc79d1bb8e6709b76680167d4b31f3852a51d
BLAKE2b-256 checksum
How to use checksums
40353cf1a0683d74ab4fdb04f22bc99f9176243938383b399f8e96ead37f789f
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

Release history Release notifications | RSS feed

0.14.0

4 release files

0.13.0

4 release files

This release

0.12.0 This release

4 release files

0.11.0

4 release files

0.10.0

4 release files

0.9.1

4 release files

0.8.20

4 release files

0.8.18

4 release files

0.8.17

4 release files

0.8.16

4 release files

0.8.15

4 release files

0.8.14

4 release files

0.8.13

4 release files

0.8.12

4 release files

0.8.11

4 release files

0.8.10

4 release files

0.8.9

4 release files

0.8.8

4 release files

0.8.7

4 release files

0.8.6

4 release files

0.8.5

4 release files

0.8.4

4 release files

0.8.2

4 release files

0.8.0

4 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