Skip to main content

Convert documents (doc, docx, odt, rtf, epub, pdf, presentations, spreadsheets, csv) to GitHub-Flavored Markdown

Project description

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 via the /parse endpoint.

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)

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

Project details


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

Uploaded CPython 3.10+Windows x86-64

firecrawl_anydoc-0.1.2-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.2-cp310-abi3-musllinux_1_2_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

firecrawl_anydoc-0.1.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

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

firecrawl_anydoc-0.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

firecrawl_anydoc-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: firecrawl_anydoc-0.1.2.tar.gz
  • Upload date:
  • Size: 182.7 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.2.tar.gz
Algorithm Hash digest
SHA256 803fcd38115cb348b72039e3cb1b8f90e6c354be57a4bd9dbfd1d61771a34df0
MD5 0ae2c03c82c86cf2049fa8406efa81a4
BLAKE2b-256 1f652a58f85793afe3220713a83efc19281715ab07df4793d06e42d9391417d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dcb20ff01a7874acd3397903271da64e0cc966d2a516afff54527df8dc58ba30
MD5 c7134a742a70ab52218eb9619b312eb0
BLAKE2b-256 df557b634a1c7963b1cbb45214e2bcf70cc3b7885710826f54b8d4bd149461ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3465caf796ebbd774607c56229c3c188fc1562a1add5c25efc54ad8da336fa11
MD5 b8134eee35eadcf4da5cca0ea2248c4e
BLAKE2b-256 8af00c306b5a550102ea74fa1356579370a592eca29ecc949abdd687b3e16a80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 60b3afcbb7edc8d206dedd0db4d3a1219425041986d80a95637cdc6aaaceacf2
MD5 f0cca8b3fa6f9bd84e4fe056ce31e14b
BLAKE2b-256 9f1aabcb8ee628faaf1d10b4f92794996196f6ebd93f93b966940a64966f099d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ddf470ec9d5c7871cd71fde0446938523699233c167311997b05aee84f978bf1
MD5 1fa36c418a27d0cef96c476110919e2e
BLAKE2b-256 5e1999ec27c23bd4c84605689b95c076c2ef77b692a68b9de505f310988ec058

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3608efc231079d02296cce7ea9221a7f9035cb18b25733aa690aa893551cc5c0
MD5 f5d0d63daf1353b11ec76257a2e2b14f
BLAKE2b-256 5ace523f82ca634a884b22893e9880981244c028e76ff84a5e3cdf95f01f2464

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64e31b157c5e6fd207873dbcbc976f6edc4206f8c568b95c9a1b36288b6e13c5
MD5 f51d7b5b117c27cc7103abe71f86bf52
BLAKE2b-256 a2478a69965d9fa80bf59ab8d1b3f094d24f28d0ce52b156946da41639897964

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a11e52f8c3b0324ddfb9ca084da1726aa94c7edd3e0be8861054a78148817e5a
MD5 810407e8b8eaeac0282effb271826227
BLAKE2b-256 443412b935215f1f22bf813e2360f89d9028ecb6c7d792de1aa26d50b17b2255

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page