zeroset-anydoc
Convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files into clean GitHub-Flavored Markdown. Python bindings for the anydoc Rust crate, built by Firecrawl. Also available as a hosted API through Firecrawl Parse, which adds our OCR models for the scanned pages anydoc can't read on its own.
Every format parses into one shared document model and renders through a single Markdown serializer, so headings, tables, lists, and footnotes come out the same no matter which format goes in. Conversion releases the GIL, so other threads keep running. Type stubs ship with the package.
pip install zeroset-anydoc
The package installs as zeroset-anydoc and imports as anydoc.
Supported formats
| Format | Extensions |
|---|---|
| Word | .doc, .docx, .docm |
| PowerPoint | .ppt, .pps, .pot, .pptx, .pptm, .ppsx, .ppsm |
| Excel | .xls, .xlsx, .xlsm, .xlsb |
| OpenDocument | .odt, .ods, .odp |
| Rich Text Format | .rtf |
| EPUB | .epub |
| CSV | .csv |
.pdf |
Usage
import anydoc
# From a file path:
markdown = anydoc.to_markdown("report.docx")
# From bytes, with the format detected from the content:
markdown = anydoc.to_markdown_bytes(data)
# Or name it, which signature-less formats (CSV) need:
markdown = anydoc.to_markdown_bytes(data, "csv")
# Or get Markdown and the document model from one parse. Rendered parts map
# source units and embedded assets back to exact ranges in document.blocks:
document = anydoc.to_document(data)
markdown = document.markdown
for part in document.rendered_parts:
blocks = document.blocks[part.start_block : part.end_block]
assets = [document.assets[asset_id] for asset_id in part.asset_ids]
# Skip the Python document graph when only rendered text and provenance are
# needed:
rendered = anydoc.to_rendered_parts(data)
for part in rendered.parts:
source = (
rendered.source_units[part.source_unit_index]
if part.source_unit_index is not None
else None
)
# Read bounded XLSX/XLSM image ownership without parsing spreadsheet cells:
manifest = anydoc.extract_spreadsheet_assets(xlsx_data)
for sheet in manifest.source_units:
images = [manifest.assets[asset_id] for asset_id in sheet.asset_ids]
Errors
A conversion raises only when no meaningful Markdown could come out of the file. The exception type names what went wrong:
try:
return anydoc.to_markdown(path)
except (anydoc.EncryptedError, anydoc.UnsupportedError) as error:
# No document comes out of these, so record the file and take the next one.
unconverted.append((path, type(error).__name__))
return None
| Exception | Raised when |
|---|---|
UnsupportedError |
Unknown format, or one that cannot be converted (an image-only PDF) |
MalformedError |
Structurally unusable: no meaningful content could be extracted |
EncryptedError |
Encrypted or password-protected |
ResourceLimitError |
Crossed a fixed safety limit (decompression, nesting, node count) |
MissingPartError |
A part required for any meaningful output is absent |
OSError |
The file could not be read, from to_markdown only |
The five conversion failures subclass anydoc.ConvertError, so catching that handles all of them at once. MalformedError.part and MissingPartError.part name the package part at fault, ResourceLimitError.limit names the limit crossed, and str(error) carries the whole message. A format argument naming no supported format raises ValueError.
Format detection
The format is read from the file content, using the marker its specification designates: the PDF header, the RTF open group, OLE stream names, the ZIP package mimetype and content types. CSV has no such marker, so detection returns None for it and the extension, or an explicit format, names it instead.
anydoc.format_from_bytes(data) # 'docx', or None when nothing matches
anydoc.format_from_extension(".pptm") # 'pptx'
anydoc.format_from_path("report.odt") # 'odt'
Images and embedded objects
Markdown cannot embed bytes, so an embedded image renders as its alt text while the bytes stay on document.assets, tagged with a media type and the part they came from. Images that carry an external URL render as ordinary Markdown images. Standard XLSX/XLSM DrawingML images retain their sheet and bounded cell placement.
Presentation slides and spreadsheet sheets are exposed through document.source_units. Each unit carries its 1-based ordinal, optional source name, extraction status, and a half-open range into document.blocks; empty and skipped units are retained.
document.rendered_parts is the ordered partition for consuming that model. Each part carries Markdown for its block range, the corresponding source-unit index when one exists, and recursively discovered embedded asset ids. Gaps and assets without honest source-unit provenance remain in unowned parts rather than being attributed to the nearest slide or sheet.
Full behavior notes and benchmarks live in the repository README.
License
Metadata
Release files for zeroset-anydoc 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 24.0 MB
Release files / zeroset_anydoc-0.2.3-cp310-abi3-win_amd64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0fdf7bcb058fc1f2658379ef105a044b5d5e0e2ab1563bff26e3b041363ab8ab
|
|
BLAKE2b-256 checksum How to use checksums |
0159d375773bb5ae4a460fdc72c288e1b27d7361490bee4f08b1b00f8522c9b5
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
17f4058e03d3b4b8b25e85a3b19606050a25fa549dfd3c9603848102c3811797
|
|
BLAKE2b-256 checksum How to use checksums |
1c539a5a411c08ce69f30f1629fdee610638861c3c2454d5a168826043b69524
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4fdad0b0e0364e7dd73a43d9119b2ccc19a9c1cd72abee8ff2d87254547d2c00
|
|
BLAKE2b-256 checksum How to use checksums |
3997896e56862e379eecbe66bffcb08c637f31470d7bf17cfb6e36050928803c
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6213f8af508cd3cb1362b4eae465803235116e8a576d0b587b03b9f96a8e6fe9
|
|
BLAKE2b-256 checksum How to use checksums |
490c7532d5fe4098ec7b5606422b6b2a4c51cc9c18d30f72be1a9945893c50b8
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d483b0d6745026dd3c551f3f23cb310572ec9e5d7e69b7c8051df18203ce4659
|
|
BLAKE2b-256 checksum How to use checksums |
ccf1faa567100fd8b9ea86c06ecd9550485647d69c486269437692529dbcbedc
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
afe46cb899e5451c4b6a9d25e71016b9f0cae455c3bb738602f82ec5f3cdcf06
|
|
BLAKE2b-256 checksum How to use checksums |
2d503ddea2ad64a3d356339804428d93507a5c180c61320c67bd767664447f17
|
| 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 Aug 6, 2026.
Transparency logRelease files / zeroset_anydoc-0.2.3-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | zeroset_anydoc-0.2.3-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
57178743028db9c3454903226b0eb7bb8a5daa2ac9bd14362e2f7b80ad731aaa
|
|
BLAKE2b-256 checksum How to use checksums |
2e255a4810bb5878e82c686bcbfc1f42ec232bf7ef10daacc0800a6baac6a776
|
| 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 Aug 6, 2026.
Transparency logSecurity for zeroset-anydoc 0.2.3
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.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for zeroset_anydoc-0.2.3-cp310-abi3-win_amd64.whl
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 Aug 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.