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 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)

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

Uploaded CPython 3.10+Windows x86-64

firecrawl_anydoc-0.1.3-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.3-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.3-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.3-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.3-cp310-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

firecrawl_anydoc-0.1.3-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.3.tar.gz.

File metadata

  • Download URL: firecrawl_anydoc-0.1.3.tar.gz
  • Upload date:
  • Size: 183.1 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.3.tar.gz
Algorithm Hash digest
SHA256 e474b1fa1af5cc27549d81a27072cc5b6b7dbfe5aa262777e345a9817b181f44
MD5 ef9a514ab6923317abffe94a42431a37
BLAKE2b-256 a732b3541611e080d42a3de26158e31165c61ad72e8dd0f53e68855b3220b91b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bf008a2fdfda84fcd625328ad71701b464e0ed222372913d36746e9a7b92e7e7
MD5 422771b7ffc22f60b41ca7c62d8a14bf
BLAKE2b-256 0518556c5aeac352e125f9b4d766f5732fb6d4c16f9dc5b88e67eaa2cdc6640e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9bb09167b9500159124f8ba4c780be4d349e9e842a4683e88c2aaf39bd8096ca
MD5 3665c3d459687f21d7003f23556dc35e
BLAKE2b-256 fe6d53244a665ef13d3c03b45d891ff61e8e320fa4edae0d837301d7323ee893

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 64fe9313d9a0495545a9794b2cc988b4dc1b281753e1c23017aa7f0e6c12f0f3
MD5 fb63a4e8a6899145866fbb95338402bd
BLAKE2b-256 c9aeaf8e6b82120526312f23206445d0afbd76e8637064ed45d823e10ae48024

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aeac246432a6bb0d7c2137f0d4d7b73d4cce903398426001e29cc8db8c4c718d
MD5 cdb0bbe1f78d6cd164d39fe6287f401b
BLAKE2b-256 840c95e80e7c47c30a98a5563ac956a84908a6a65e0723a76da7fd6ecaef6406

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 60001691c55dd9fb5a4a75118749324a4996ce07349046c50b97d8dbcad5935a
MD5 df784fc17766d1f5cd16ed983d01a30e
BLAKE2b-256 b8006851b21cefbdcf62401f0c926eda45f3374bb12c172f39b4ca5956822433

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd05f1eba6152667f94511802d89d2259c0b2d02990717bced917b7b2c2f6eb6
MD5 c6676919f832580b6108b1929441f44d
BLAKE2b-256 97c7c1c8bb05659030340bd98f9a180b1dce23c8a3f98a7a8f7920246cea0223

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 21230921d27d7e37d2ffd4a8b936c13420e097aa342fd69faeb5600260153535
MD5 eded0e8c7efb8a6519c17c252046c6b5
BLAKE2b-256 951321c9a74e4880c2f1fc279cb2162ff99cbf517956a3d8bbfc3967a4bbbadc

See more details on using hashes here.

Provenance

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