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.1.8.tar.gz (197.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.1.8-cp310-abi3-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

firecrawl_anydoc-0.1.8-cp310-abi3-musllinux_1_2_x86_64.whl (3.8 MB view details)

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

firecrawl_anydoc-0.1.8-cp310-abi3-musllinux_1_2_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

firecrawl_anydoc-0.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

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

firecrawl_anydoc-0.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

firecrawl_anydoc-0.1.8-cp310-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

firecrawl_anydoc-0.1.8-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.1.8.tar.gz.

File metadata

  • Download URL: firecrawl_anydoc-0.1.8.tar.gz
  • Upload date:
  • Size: 197.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.1.8.tar.gz
Algorithm Hash digest
SHA256 342289a9e7fcc46a312919547b475827f202f6824c2acf05e334fc1ed386e77e
MD5 3227fbcb33db0eb182a717406e829b48
BLAKE2b-256 e95894bdc78509da5d2bec4761cfc6e79061d35562d4397b504aec59e29b548b

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8.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.1.8-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bf755eb80439f0a1540b298648919f19751c16f942a7376ee68dea5318e3f2a3
MD5 7f57b1fbf40d0061e30fd051f2987c8e
BLAKE2b-256 df91743986265ae347f0380a21d60378155575f4d724465c77c7e4781923df57

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4b7d79b8f7c158a67232982dc1883c07114d95f69d7aedc902d0b113a5546b16
MD5 cba0caa4e8c9b9c32d32f4693e0f3cf4
BLAKE2b-256 85babd6b8502093ddcc8fe170fdc20a37009dc5e7a6ae55551ede69a9639ecf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 07e4b9444cc979f2eb35289c8d28d738474209824a29d07081af25cd6a65bf9b
MD5 b44dbbe41d3b4e901d7216c24e288130
BLAKE2b-256 17f6438c158410c0f696dbb29e4f0b83cbb6cd89511792fd97917aaa4f2cc76e

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3ba80a81f1831b5cdfcc14678e3ed13078587710fb3f5556f193dbcaa901070
MD5 4439fc05f84ef31df3bbfd408ab4c3f8
BLAKE2b-256 b8230d4fb73798b6554a63f38468e62ce13f1d411ef3dd879efc4c89f535ee44

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cfe87061151cb42dd52960eb84f4ec6249a220131e61b498bba1248b86ef51cc
MD5 fd179d0307e21047077f55d7986da265
BLAKE2b-256 af109216bb6e65d027aac7c4c856ad921684337c105f69db77703059afd1ec1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8920b0d303ae5ad34bc5e580b25043eaf107df73e4f8f2f02282bfad7f19845a
MD5 eecb8d9c1f21606f1d0937b015c79b75
BLAKE2b-256 cdc1ab54eb4ca0a131017941964219fbf80873059b4261b046f8dda1bdeb858c

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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.1.8-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.8-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8a7218553f691f112a2d71f2c08c3ef87de3ce4d15fa82ffa782f493a307a284
MD5 ade93869adf52b17f300cef2b747f54e
BLAKE2b-256 9761abd70c4215e2804c8dad88c2abe8685fa84f4d2496ce7fc17d7f7a1cc21d

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.8-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

0.2.0

8 files

0.1.9

8 files

This release

0.1.8 This release

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