Skip to main content

firecrawl-anydoc

PyPI License: MIT

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 firecrawl-anydoc

The package installs as firecrawl-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 .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 stop at the document model, which also carries embedded assets:
document = anydoc.to_document(data)

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.

Full behavior notes and benchmarks live in the repository README.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firecrawl_anydoc-0.2.0.tar.gz (242.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

firecrawl_anydoc-0.2.0-cp310-abi3-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10+Windows x86-64

firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

firecrawl_anydoc-0.2.0-cp310-abi3-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

firecrawl_anydoc-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file firecrawl_anydoc-0.2.0.tar.gz.

File metadata

  • Download URL: firecrawl_anydoc-0.2.0.tar.gz
  • Upload date:
  • Size: 242.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for firecrawl_anydoc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 de7e79449220427d5e15177a8721c37deddecb8e4124dc070dfa520177b4d9b1
MD5 9a5aaf58e10fcc804f836f8bc10f9e49
BLAKE2b-256 3c506d4dd6c2308934030338fa58b74004b93bf2ed80a8766ee09f5f4e797846

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0.tar.gz:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 330620257114ce0953f2ea9a0c238499bbc819d4143f504fa967171c99d5ad95
MD5 e1a0a498d1614f02b3ae08d3970a493f
BLAKE2b-256 b867898ad44b23cd23f2f571ee2442ddd9ca66adb50d978c199f9c4bb1089b40

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 603940ac5418cadb1d10b96e17019ce1f8505c212d17367f227fad32d1b7714b
MD5 0aa299b8134670267daf802462298042
BLAKE2b-256 aaf3f72dc71062c064dc6ceab1f94ad95da2a77b210c3990ed5080bd1684396a

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4e10ee371d453b163c1dae4057d190184df17528db32b805095b9bfe012818a8
MD5 8b250bfbe1b78c6db1e697ecf1123798
BLAKE2b-256 18f1d4fbfb180a49bbc094e082d015ea9b0b97cc3496b418bf3034eb5fafd069

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97dd2624577e986a149af43a007d8f7b2d4da3c5012f304bd4aa33a7c543b271
MD5 f28361b7483d2b1a70f144e7549c6dce
BLAKE2b-256 c842c0d50182ea71c7bc11afc5193f914f874df45b141518a37125a46e285654

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a98255b510310b9b50be90b7e12d72528c02f3764df00522a3d6b76d22dc3ed8
MD5 aa1702ea9e3a169b14fe824cbebd6c14
BLAKE2b-256 882395686d5a62a69e439718aca6bc060961fb02d1d75058b74272ce8edc9523

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3330949f21f3f42c304e83cdecb921d7fa90999ff204ba419c2cdea8cd73b2c7
MD5 8843eec1d359880ef6b14b0a97dc8221
BLAKE2b-256 ae182c7dc956d79aa496b5a646e8256918777011024360ea2847d2730a03bb17

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 84dedb692ec0786c08df176f61724bb65c500d6fc2e5d5a15b72852b8a36690c
MD5 e66efc9258c2403caaba5b143bb67ca1
BLAKE2b-256 8b200a63669df3c2ce2f4d09fd27f000ceb19ab8d3473de8e0c64038006e061a

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.4

8 files

0.2.3

8 files

0.2.2

8 files

0.2.1

8 files

This release

0.2.0 This release

8 files

0.1.9

8 files

0.1.8

8 files

0.1.7

8 files

0.1.6

8 files

0.1.5

8 files

0.1.4

8 files

0.1.3

8 files

0.1.2

8 files

0.1.1

8 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