pyspoor
在 Python 应用中解析文件内容,提示可能遗漏的部分,并查找模型引用。它和 CLI 共用同一套 Rust 解析代码,支持 Python 3.9 及以上版本。
pip install pyspoor
from spoor import locate_quote, parse_path
result = parse_path("report.pdf", pages=(1, 3), provenance="block")
for warning in result.warnings:
print(warning["code"], warning.get("location"))
markdown = result.content.value.markdown
found = locate_quote(markdown, "需要查找的引文", result.provenance)
表格可以使用 sheet、rows、columns、limit 和 offset 筛选;PDF/PPTX 使用 pages。extract_media(data, uri, ...) 可以通过解析结果中的 spoor:// 链接提取对应图片或文件。
本地开发使用 maturin develop。完整参数、返回值、警告和错误码见接口参考。
Metadata
Release files for pyspoor 0.14.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.14.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| pyspoor-0.14.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.14.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| pyspoor-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.7 MB
Release files / pyspoor-0.14.0-cp39-abi3-win_amd64.whl
| Download URL | pyspoor-0.14.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c764e1410100e2c3d26f4279d37f9c236a9111e04b218c5fc07dc06ab3ed199c
|
|
BLAKE2b-256 checksum How to use checksums |
a9aaa89bbfcb0c956b52ca0e9554fe9688ef9d3977c48663218a368c10a79dcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency logRelease files / pyspoor-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyspoor-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a0967989f6836dd91d380fec18374230a0c8c3ba760ef4ac4f6ddab86e5c8892
|
|
BLAKE2b-256 checksum How to use checksums |
56dda28403877dd87acbaf929a9e268f7b92ad325e3da1d96bb4fdfc00f63bee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency logRelease files / pyspoor-0.14.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pyspoor-0.14.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 |
de255515a3f5e9ca2430f9bc78af3eca7b710a829f77ac9b346264c9d183a8a4
|
|
BLAKE2b-256 checksum How to use checksums |
bc43623cebb22a0df48418486cf2b7fd328fa67eebb3551c4aa60f5a8ad9e3ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency logRelease files / pyspoor-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pyspoor-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c46bc01207875159f6a965024dfe68d4247cd75fab56ba3278a446a7ceb2e275
|
|
BLAKE2b-256 checksum How to use checksums |
f57e8e59ada26d4b5a1cc180d163ee501294c2d5b8b6c1c8ded28d944ca1f5dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency log