Metadata-Version: 2.4
Name: markitdown-rs
Version: 0.2.1
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: Topic :: Office/Business
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Dist: mammoth>=1.12.2,<2 ; extra == 'all'
Requires-Dist: lxml ; extra == 'all'
Requires-Dist: beautifulsoup4 ; extra == 'all'
Requires-Dist: defusedxml ; extra == 'all'
Requires-Dist: pydub ; extra == 'all'
Requires-Dist: speechrecognition ; extra == 'all'
Requires-Dist: audioop-lts ; python_full_version >= '3.13' and extra == 'all'
Requires-Dist: youtube-transcript-api~=1.2.3 ; extra == 'all'
Requires-Dist: azure-ai-documentintelligence ; extra == 'all'
Requires-Dist: azure-ai-contentunderstanding>=1.2.0b1 ; extra == 'all'
Requires-Dist: azure-identity ; extra == 'all'
Requires-Dist: pydub ; extra == 'audio-transcription'
Requires-Dist: speechrecognition ; extra == 'audio-transcription'
Requires-Dist: audioop-lts ; python_full_version >= '3.13' and extra == 'audio-transcription'
Requires-Dist: azure-ai-contentunderstanding>=1.2.0b1 ; extra == 'az-content-understanding'
Requires-Dist: azure-identity ; extra == 'az-content-understanding'
Requires-Dist: azure-ai-documentintelligence ; extra == 'az-doc-intel'
Requires-Dist: azure-identity ; extra == 'az-doc-intel'
Requires-Dist: mammoth>=1.12.2,<2 ; extra == 'docx'
Requires-Dist: lxml ; extra == 'docx'
Requires-Dist: beautifulsoup4 ; extra == 'docx'
Requires-Dist: defusedxml ; extra == 'docx'
Requires-Dist: mcp>=2.1.1,<3.0.0 ; extra == 'mcp'
Requires-Dist: mammoth>=1.12.2,<2 ; extra == 'ocr'
Requires-Dist: openpyxl ; extra == 'ocr'
Requires-Dist: pandas ; extra == 'ocr'
Requires-Dist: pdfminer-six>=20251230 ; extra == 'ocr'
Requires-Dist: pdfplumber>=0.11.9 ; extra == 'ocr'
Requires-Dist: pillow>=12.1.1 ; extra == 'ocr'
Requires-Dist: pymupdf>=1.24.0,<2 ; extra == 'ocr'
Requires-Dist: python-docx ; extra == 'ocr'
Requires-Dist: python-pptx ; extra == 'ocr'
Requires-Dist: youtube-transcript-api~=1.2.3 ; extra == 'youtube-transcription'
Provides-Extra: all
Provides-Extra: audio-transcription
Provides-Extra: az-content-understanding
Provides-Extra: az-doc-intel
Provides-Extra: docx
Provides-Extra: mcp
Provides-Extra: ocr
Provides-Extra: outlook
Provides-Extra: pdf
Provides-Extra: pptx
Provides-Extra: xls
Provides-Extra: xlsx
Provides-Extra: youtube-transcription
Summary: Microsoft's markitdown Python API backed by Rust: same `markitdown` module, same Markdown output, no heavy dependencies
Keywords: markitdown,markitdown-alternative,markdown,pdf-to-markdown,docx-to-markdown,document-conversion,llm,rag,mcp
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/majiayu000/markitdown-rs/releases
Project-URL: Documentation, https://github.com/majiayu000/markitdown-rs/tree/main/crates/markitdown-py#readme
Project-URL: Homepage, https://majiayu000.github.io/markitdown-rs/
Project-URL: Issues, https://github.com/majiayu000/markitdown-rs/issues
Project-URL: Source, https://github.com/majiayu000/markitdown-rs

# markitdown-rs (Python)

Microsoft's [markitdown](https://github.com/microsoft/markitdown) Python API,
backed by [markitdown-rs](https://github.com/majiayu000/markitdown-rs): the
same `markitdown` module and the same Markdown, byte for byte, from one native
extension instead of pdfminer, pandas, mammoth, magika and onnxruntime.

```python
from markitdown import MarkItDown

md = MarkItDown()
result = md.convert("report.pdf")          # path, Path, URL, file:/data: URI, stream or requests.Response
print(result.markdown)                     # also result.text_content
```

`convert`, `convert_local`, `convert_stream`, `convert_uri`, `convert_response`,
`StreamInfo`, the exception classes, custom converters (`register_converter`,
the `markitdown.converters` classes), plugins (`enable_plugins=True`, e.g.
markitdown-ocr), `llm_client` image captions, `requests_session`,
`exiftool_path` and the Azure `docintel_*` / `cu_*` options behave as in
markitdown 0.1.9, and so does `style_map` (through mammoth, with the
`docx` extra). Unknown keyword arguments are ignored, as in markitdown,
with a warning naming them (unless plugins are enabled). The wheel installs markitdown's `markitdown` command too (also
`python -m markitdown`), with all of 0.1.9's flags.
The module is named `markitdown`, so install it instead of, not next to, the
Python package of that name.

Build a wheel from a checkout with uv (into `target/wheels/`):

```bash
cd crates/markitdown-py
uv venv .venv && VIRTUAL_ENV=$PWD/.venv uv pip install maturin
VIRTUAL_ENV=$PWD/.venv .venv/bin/maturin build --release
```

The optional features take markitdown's extras, by the same names:

```bash
uv pip install 'target/wheels/markitdown_rs-0.2.0-cp310-abi3-macosx_11_0_arm64.whl[all]'
```

| Extra | Installs | For |
|---|---|---|
| `audio-transcription` | SpeechRecognition, pydub (and audioop-lts on Python 3.13+) | `### Audio Transcript` for wav, mp3, m4a (mp3 and m4a need ffmpeg) |
| `youtube-transcription` | youtube-transcript-api | `### Transcript` for YouTube pages |
| `az-doc-intel` | azure-ai-documentintelligence, azure-identity | `docintel_endpoint=` |
| `az-content-understanding` | azure-ai-contentunderstanding, azure-identity | `cu_endpoint=` |
| `docx` | mammoth, lxml, beautifulsoup4, defusedxml | `style_map=` |
| `mcp` | the MCP SDK | `markitdown-mcp` and `markitdown mcp` (markitdown-mcp 0.0.1a8's server, with plugins) |
| `ocr` | markitdown-ocr's dependencies except `markitdown` | then `pip install --no-deps markitdown-ocr` |
| `all` | all of the above | |

`pptx`, `xlsx`, `xls`, `pdf` and `outlook` exist but install nothing: those
converters are built in.

Plugins depend on Microsoft's `markitdown`, which would overwrite this
package's `markitdown` module; install them with `--no-deps` (or, with uv,
`override-dependencies = ["markitdown; sys_platform == 'never'"]`). The
package warns, when `markitdown` is imported, if both are installed or if
its `markitdown` module was removed or replaced.

Or install it into a development environment and run the tests:

```bash
cd crates/markitdown-py
uv venv .venv && VIRTUAL_ENV=$PWD/.venv uv pip install maturin pytest
VIRTUAL_ENV=$PWD/.venv .venv/bin/maturin develop --release --uv
.venv/bin/pytest tests                     # needs target/release/markitdown (cargo build --release)
```

