Python bindings for the Rust doxx document converter
Project description
python-doxx
Minimal Python bindings for the doxx Rust library. Exposes just the pieces needed for scripted document inspection:
convert(path, export_format="markdown", page=None, images=False)— export.docxfiles as Markdown, plain text, JSON, CSV, or ANSI strings. Optionalpageisolates a single page (1-indexed); setimages=Trueto retain image references when available.search(path, query, page=None)— return match locations for quick content checks, mirroringdoxx --search.extract_images(path, output_dir)— dump embedded images, similar to--extract-imagesin the CLI.
Installation
Once the tagged v0.1.0 release has propagated to PyPI:
pip install python-doxx
# or
uv pip install python-doxx
To build from source locally:
maturin develop
Usage
import doxx
# Export to Markdown
markdown = doxx.convert("report.docx", export_format="markdown", images=True)
# Pull a single page as CSV
csv_page = doxx.convert("data.docx", export_format="csv", page=2)
# Locate text snippets
hits = doxx.search("contract.docx", "payment")
for hit in hits:
print(hit.page, hit.text)
# Extract embedded images
saved = doxx.extract_images("slides.docx", "./images")
Supported export formats: markdown, text, json, csv, and ansi.
Images are optional; enable them when you need real file paths in the exported Markdown or ANSI render. CSV export raises ValueError if the document contains no tables.
Releasing
- Make sure
CHANGELOG.md(if present) andpyproject.tomlshare the new version. - Tag the release (
git tag v0.1.0), thengit push --tags. - The GitHub Actions workflow builds wheels for macOS, Linux, and Windows, uploads them as artifacts, and—when
PYPI_API_TOKENis configured in the repository secrets—publishes to PyPI automatically.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_doxx-0.1.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: python_doxx-0.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4390692effbc0c3a78e6bedbaeac4d09730e712869381e38283609b974f94505
|
|
| MD5 |
e818571a21ec5492c524fdcdafebbcb7
|
|
| BLAKE2b-256 |
357aa8fdce0ccd7624e22aa61bfaad1301d55ce3e79c47fed04f049788260378
|
File details
Details for the file python_doxx-0.1.0-cp312-cp312-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: python_doxx-0.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.12, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bce4977aa4f4d31cc0624e593a0c758ca2a7d2905bdbf37df520baa6a63b07f2
|
|
| MD5 |
a60c40359f563c8a47a2fcc178a48f45
|
|
| BLAKE2b-256 |
f57901e1a77b78a4c3f9711aba05910b84bcbbd54a847e0e63fba91e22d6a11b
|
File details
Details for the file python_doxx-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: python_doxx-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86688818a112c843b15ab7039bc145f29bdaabf3dfbd954802cd042e33a64094
|
|
| MD5 |
b70e94232906426a39f23aa93d8d07dc
|
|
| BLAKE2b-256 |
97b185b941366d0f06023da2146872e2ab0ffbd98a6b11880ab338957cb9c344
|
File details
Details for the file python_doxx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: python_doxx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66f5246895b85829dcdf306b1bdae1e2c3ef6b5e8d03855f3d071330121f3b98
|
|
| MD5 |
3f3d77d3f8cac3127c58e2fbd788edd4
|
|
| BLAKE2b-256 |
516a46e8f815021e7c6ab57a6d643259b2a45183f08aa008c621add82ca489ca
|
File details
Details for the file python_doxx-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl.
File metadata
- Download URL: python_doxx-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c446d33ed64e251f43aebd5b35c5b2e25e5ee9182b98268f4ef46fc002d1ab36
|
|
| MD5 |
483c1a6b501104f8829c723f083fe3d6
|
|
| BLAKE2b-256 |
619dcab2141b336e738d1a80b43d24a70af2d009bb72bd08cd6e954be3a1c95e
|