Skip to main content

anytomd

PyPI Python Docs Upstream

Python binding of anytomd-rs — the pure-Rust engine by developer0hye that converts DOCX, PPTX, XLSX, HTML, CSV, notebooks, images and code into clean Markdown, designed for LLM consumption.

Same engine, same output, now one pip install away: no Python dependencies, the GIL released during conversion, native asyncio, typed end to end.

pip install anytomd        # or: uv add anytomd
from anytomd import convert_file

result = convert_file("report.docx")
print(result.markdown)     # headings, tables, lists, links, images
print(result.plain_text)   # the same content, no Markdown syntax
print(result.title)        # 'Quarterly Report'

Formats

Format Extensions
Word, PowerPoint, Excel .docx .pptx .xlsx .xls
Web and data .html .htm .csv .json .xml .ipynb
Images .png .jpg .gif .webp .bmp .tiff .svg .heic .avif
Code and text .py .rs .js .ts .go … · .txt .md .yaml .toml …

Detected from magic bytes and extension. PDF is refused by the engine on purpose: current LLMs read it natively — the optional pdf extra parses it locally when you would rather not send it. Details per format → Formats.

API

Call Does
convert_file(path, **options) Convert a file; format autodetected
convert_bytes(data, format, **options) Convert in-memory bytes; format is an extension ("docx", ".csv")
await convert_file_async(path, **options) Awaitable, off the event loop; images described concurrently
await convert_bytes_async(data, format, **options) Awaitable variant over bytes
detect_format(path, data) The format the engine would pick, or None
detect_zip_format(data) "docx", "pptx", "xlsx" behind a ZIP, or None

Options, keyword-only on every conversion: extract_images, extract_comments, strict, max_input_bytes, max_total_image_bytes, max_uncompressed_zip_bytes, and image_describer / async_image_describer. One by one → Reference.

LLM image descriptions

Any callable (image: bytes, mime_type: str, prompt: str) -> str writes the alt text — your OpenAI, Anthropic or local model — or use the built-in Gemini describers:

from anytomd import GeminiDescriber, convert_file

result = convert_file("deck.pptx", image_describer=GeminiDescriber())   # GEMINI_API_KEY
# ![A bar chart of quarterly revenue by region](image1.png)

The async variants take an async def and describe every image of a document concurrently. A failing describer never aborts the conversion: it becomes a warning. → Image descriptions

Optional capabilities

The wheel keeps zero Python dependencies. Four extras add a capability — the name says what it brings, not the library behind it:

Extra Adds Backed by
[ocr] LiteParseDescriber: local OCR alt text — offline, no key, free liteparse, Rust in-process
[vlm] OpenAIDescriber: vision answers through any OpenAI-compatible endpoint — OpenAI, Anthropic, Gemini, local servers openai SDK
[pdf] PdfConverter: PDF to Markdown, OCR on by default liteparse again (the wheel deduplicates)
[full] all three, plus the composite below

GeminiDescriber needs no extra: it is compiled into every wheel.

ImageDescriber composes them with one rule — empty means no letters: OCR answers images that carry text; only when it reads nothing does the vision model describe the image; when everything is silent, the alt text stays empty exactly as without a describer.

uv add "anytomd[full]"
from anytomd import ImageDescriber, convert_file

describer = ImageDescriber(
    model="claude-sonnet-5-5",
    api_base="https://api.anthropic.com/v1/",       # Anthropic's OpenAI-compatible endpoint
    api_key="sk-ant-...",
)
result = convert_file("deck.pptx", image_describer=describer)
describer.close()

Errors

Best-effort by default: recoverable problems land in result.warnings; strict=True raises instead. Unrecoverable ones raise a subclass of ConvertError; unreadable paths raise FileNotFoundError and friends. → Errors and warnings

Upstream

All conversion logic, format coverage and performance belong to anytomd-rs — see its README for benchmarks, the CLI and the WASM build. anytomd.__version__ reports the engine release compiled into your wheel. Markdown output issues go upstream; Python API issues go here. → Upstream and versioning

Self-maintenance

The binding follows its dependencies on its own; a human only reviews and merges.

Trigger Job Does
New anytomd-rs, PyO3, tokio, tooling release Renovate Opens a PR (renovate/*)
That PR sync.yml Sets the package version to the engine's, logs the engine in CHANGELOG.md, regenerates THIRD_PARTY_LICENSES.md
Every push and PR ci.yml prek hooks, tests on Linux/macOS/Windows × Python 3.12/3.14, Rust coverage ≥ 90 %, docs; on renovate/* also the engine's public API diff and release notes
CI red, or engine API grew ai-fix.yml A Qwen Code agent repairs or extends the binding under QWEN.md; allowlisted commits only, three attempts at most
First day of the month health.yml Flags archived, vanished, stale or dormant dependencies in one issue
v* tag release.yml Wheels for five platforms, sdist, build provenance, PyPI via trusted publishing

Package version = engine version; binding-only fixes ship as .postN. Exactly which files each piece may edit, and with which tool → What it touches

Development

uv sync && uv run prek install   # hooks: ruff, ty, tach, rustfmt, clippy, licenses, zizmor, docs, gitleaks
make check                       # build + ruff + ty + tach + tests
make cov                         # Rust coverage driven by the Python suite (gate 90 %)

→ Development

License

Apache-2.0, like anytomd-rs. Wheels statically link anytomd-rs and its dependencies; their licenses ship in THIRD_PARTY_LICENSES.md, inside every wheel too.

Metadata

Release files for anytomd 1.3.1.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anytomd 1.3.1.post2
File Size Uploaded Provenance
anytomd-1.3.1.post2.tar.gz 70.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for anytomd 1.3.1.post2
File
anytomd-1.3.1.post2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details
anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details
anytomd-1.3.1.post2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
anytomd-1.3.1.post2-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 13.3 MB

Release files / anytomd-1.3.1.post2.tar.gz

Download URL anytomd-1.3.1.post2.tar.gz
Size 70.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bd14ac1b19a4622a46c8f1daafbd58a4d58cd441dd36b17d5c3e588b3ce6b9c4
BLAKE2b-256 checksum
How to use checksums
97badbda0ea33257e6b34b1a6fb43b1f9aff5e01ca3d4b23b58b8e13bdbc1c72
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 Oct 15, 2026.

Transparency log

Release files / anytomd-1.3.1.post2-cp312-abi3-win_amd64.whl

Download URL anytomd-1.3.1.post2-cp312-abi3-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e9d5669251cd38660338935c095066ab48810fd2dc609bc5aacae7bef1fc4918
BLAKE2b-256 checksum
How to use checksums
19f55c92e7dbe514235d8869ed47e2f0a3b5bc93d592e869b6d2eb97bfd11a25
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 Oct 15, 2026.

Transparency log

Release files / anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_x86_64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
9e5ec530314c3346818d0a59598873aedaee7f20f265f8b65da93335bbf0c91d
BLAKE2b-256 checksum
How to use checksums
fde8abd891c6c3b556dc6943f0d890f3d3c893c6fdf70c30aeea4ff63472d802
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 Oct 15, 2026.

Transparency log

Release files / anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL anytomd-1.3.1.post2-cp312-abi3-manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
8ea2c47aadd8f01986bc27f7c846dd41e85dc52efd7a1d91c8e432c38ceac0e0
BLAKE2b-256 checksum
How to use checksums
c7a0a86555bf46bbd04626df0b053f109f5df1798fe680ccdbf9161df15111e1
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 Oct 15, 2026.

Transparency log

Release files / anytomd-1.3.1.post2-cp312-abi3-macosx_11_0_arm64.whl

Download URL anytomd-1.3.1.post2-cp312-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ccc9079e9c71610c8b7eae1376c68ef56193caa2853154cf936b95ecf921d662
BLAKE2b-256 checksum
How to use checksums
7e90710254f591820008f5bc370086f3a235194596caf42dd8cda7455b114f95
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 Oct 15, 2026.

Transparency log

Release files / anytomd-1.3.1.post2-cp312-abi3-macosx_10_12_x86_64.whl

Download URL anytomd-1.3.1.post2-cp312-abi3-macosx_10_12_x86_64.whl
Size 2.6 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
24d0b795fd59bee016b55c46fbc6e3d5cf06382ebab95dcb4fbed23100750c50
BLAKE2b-256 checksum
How to use checksums
54addbe7f09213746a0e5377cffc497fe4d55c50b076bdda4ab5bfd44de7e4d1
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 Oct 15, 2026.

Transparency log

Security for anytomd 1.3.1.post2

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for anytomd-1.3.1.post2.tar.gz

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 Oct 15, 2026.

Transparency log

A 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.

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