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

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.9.1
File
pyspoor-0.9.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
pyspoor-0.9.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
pyspoor-0.9.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
pyspoor-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.1 MB

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

Download URL pyspoor-0.9.1-cp39-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
96b139234c2daabaea3ef357d50cf9eae9f43dc01df91b8110a9aa5ec64ced70
BLAKE2b-256 checksum
How to use checksums
dedf611f7bbd35cd7f1821b6f6da7a04702e58610cdf9277f50461e68881ec37
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.9.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyspoor-0.9.1-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
ff0923edd19bfebfbb26bb5c469a66c75fb59588507bbcc6ee79bf21d9c7ed3b
BLAKE2b-256 checksum
How to use checksums
ae1cfd0b87850e2dbc7988cd87d39ded4331cb18e5d5abfab0899f483c486986
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.9.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL pyspoor-0.9.1-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
4d094542650a04668b3819883dd21e18e0dc2db96a2c209769ee61fbe412a905
BLAKE2b-256 checksum
How to use checksums
dfda6e441a6407e03b48eca1068bed3a457e2588a208fca62c145fa7f000a14f
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.9.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pyspoor-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2a4d6a3975dcdcc132436478851658e4f14f098b7975e72955ef65437f7b4f30
BLAKE2b-256 checksum
How to use checksums
a62a904e9995b00f1dbf95ee9231818f544dfe9a4fa689b26d92376ce5b87fa5
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

0.12.0

4 release files

0.11.0

4 release files

0.10.0

4 release files

This release

0.9.1 This release

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