python-doxx


Namepython-doxx JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython bindings for the Rust doxx document converter
upload_time2025-10-29 21:28:19
maintainerNone
docs_urlNone
authorCodex Assistant
requires_python>=3.8
licenseNone
keywords docx conversion markdown python-binding doxx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-doxx

Minimal Python bindings for the [`doxx`](https://github.com/bgreenwell/doxx) Rust library. Exposes just the pieces needed for scripted document inspection:

- `convert(path, export_format="markdown", page=None, images=False)` — export `.docx` files as Markdown, plain text, JSON, CSV, or ANSI strings. Optional `page` isolates a single page (1-indexed); set `images=True` to retain image references when available.
- `search(path, query, page=None)` — return match locations for quick content checks, mirroring `doxx --search`.
- `extract_images(path, output_dir)` — dump embedded images, similar to `--extract-images` in the CLI.

## Installation

Once the tagged `v0.1.0` release has propagated to PyPI:

```bash
pip install python-doxx
# or
uv pip install python-doxx
```

To build from source locally:

```bash
maturin develop
```

## Usage

```python
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

1. Make sure `CHANGELOG.md` (if present) and `pyproject.toml` share the new version.
2. Tag the release (`git tag v0.1.0`), then `git push --tags`.
3. The GitHub Actions workflow builds wheels for macOS, Linux, and Windows, uploads them as artifacts, and—when `PYPI_API_TOKEN` is configured in the repository secrets—publishes to PyPI automatically.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-doxx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "docx, conversion, markdown, python-binding, doxx",
    "author": "Codex Assistant",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "# python-doxx\n\nMinimal Python bindings for the [`doxx`](https://github.com/bgreenwell/doxx) Rust library. Exposes just the pieces needed for scripted document inspection:\n\n- `convert(path, export_format=\"markdown\", page=None, images=False)` \u2014 export `.docx` files as Markdown, plain text, JSON, CSV, or ANSI strings. Optional `page` isolates a single page (1-indexed); set `images=True` to retain image references when available.\n- `search(path, query, page=None)` \u2014 return match locations for quick content checks, mirroring `doxx --search`.\n- `extract_images(path, output_dir)` \u2014 dump embedded images, similar to `--extract-images` in the CLI.\n\n## Installation\n\nOnce the tagged `v0.1.0` release has propagated to PyPI:\n\n```bash\npip install python-doxx\n# or\nuv pip install python-doxx\n```\n\nTo build from source locally:\n\n```bash\nmaturin develop\n```\n\n## Usage\n\n```python\nimport doxx\n\n# Export to Markdown\nmarkdown = doxx.convert(\"report.docx\", export_format=\"markdown\", images=True)\n\n# Pull a single page as CSV\ncsv_page = doxx.convert(\"data.docx\", export_format=\"csv\", page=2)\n\n# Locate text snippets\nhits = doxx.search(\"contract.docx\", \"payment\")\nfor hit in hits:\n    print(hit.page, hit.text)\n\n# Extract embedded images\nsaved = doxx.extract_images(\"slides.docx\", \"./images\")\n```\n\nSupported export formats: `markdown`, `text`, `json`, `csv`, and `ansi`.\n\nImages 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.\n\n## Releasing\n\n1. Make sure `CHANGELOG.md` (if present) and `pyproject.toml` share the new version.\n2. Tag the release (`git tag v0.1.0`), then `git push --tags`.\n3. The GitHub Actions workflow builds wheels for macOS, Linux, and Windows, uploads them as artifacts, and\u2014when `PYPI_API_TOKEN` is configured in the repository secrets\u2014publishes to PyPI automatically.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python bindings for the Rust doxx document converter",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/oneryalcin/python-doxx",
        "Issues": "https://github.com/oneryalcin/python-doxx/issues",
        "Repository": "https://github.com/oneryalcin/python-doxx"
    },
    "split_keywords": [
        "docx",
        " conversion",
        " markdown",
        " python-binding",
        " doxx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "619dcab2141b336e738d1a80b43d24a70af2d009bb72bd08cd6e954be3a1c95e",
                "md5": "483c1a6b501104f8829c723f083fe3d6",
                "sha256": "c446d33ed64e251f43aebd5b35c5b2e25e5ee9182b98268f4ef46fc002d1ab36"
            },
            "downloads": -1,
            "filename": "python_doxx-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "483c1a6b501104f8829c723f083fe3d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 3211562,
            "upload_time": "2025-10-29T21:28:19",
            "upload_time_iso_8601": "2025-10-29T21:28:19.916637Z",
            "url": "https://files.pythonhosted.org/packages/61/9d/cab2141b336e738d1a80b43d24a70af2d009bb72bd08cd6e954be3a1c95e/python_doxx-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "516a46e8f815021e7c6ab57a6d643259b2a45183f08aa008c621add82ca489ca",
                "md5": "3f3d77d3f8cac3127c58e2fbd788edd4",
                "sha256": "66f5246895b85829dcdf306b1bdae1e2c3ef6b5e8d03855f3d071330121f3b98"
            },
            "downloads": -1,
            "filename": "python_doxx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "3f3d77d3f8cac3127c58e2fbd788edd4",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 2997558,
            "upload_time": "2025-10-29T21:28:25",
            "upload_time_iso_8601": "2025-10-29T21:28:25.625182Z",
            "url": "https://files.pythonhosted.org/packages/51/6a/46e8f815021e7c6ab57a6d643259b2a45183f08aa008c621add82ca489ca/python_doxx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "97b185b941366d0f06023da2146872e2ab0ffbd98a6b11880ab338957cb9c344",
                "md5": "b70e94232906426a39f23aa93d8d07dc",
                "sha256": "86688818a112c843b15ab7039bc145f29bdaabf3dfbd954802cd042e33a64094"
            },
            "downloads": -1,
            "filename": "python_doxx-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b70e94232906426a39f23aa93d8d07dc",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 3568388,
            "upload_time": "2025-10-29T21:28:27",
            "upload_time_iso_8601": "2025-10-29T21:28:27.343280Z",
            "url": "https://files.pythonhosted.org/packages/97/b1/85b941366d0f06023da2146872e2ab0ffbd98a6b11880ab338957cb9c344/python_doxx-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f57901e1a77b78a4c3f9711aba05910b84bcbbd54a847e0e63fba91e22d6a11b",
                "md5": "a60c40359f563c8a47a2fcc178a48f45",
                "sha256": "bce4977aa4f4d31cc0624e593a0c758ca2a7d2905bdbf37df520baa6a63b07f2"
            },
            "downloads": -1,
            "filename": "python_doxx-0.1.0-cp312-cp312-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a60c40359f563c8a47a2fcc178a48f45",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 3519034,
            "upload_time": "2025-10-29T21:28:28",
            "upload_time_iso_8601": "2025-10-29T21:28:28.997595Z",
            "url": "https://files.pythonhosted.org/packages/f5/79/01e1a77b78a4c3f9711aba05910b84bcbbd54a847e0e63fba91e22d6a11b/python_doxx-0.1.0-cp312-cp312-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "357aa8fdce0ccd7624e22aa61bfaad1301d55ce3e79c47fed04f049788260378",
                "md5": "e818571a21ec5492c524fdcdafebbcb7",
                "sha256": "4390692effbc0c3a78e6bedbaeac4d09730e712869381e38283609b974f94505"
            },
            "downloads": -1,
            "filename": "python_doxx-0.1.0-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e818571a21ec5492c524fdcdafebbcb7",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 2919474,
            "upload_time": "2025-10-29T21:28:30",
            "upload_time_iso_8601": "2025-10-29T21:28:30.437680Z",
            "url": "https://files.pythonhosted.org/packages/35/7a/a8fdce0ccd7624e22aa61bfaad1301d55ce3e79c47fed04f049788260378/python_doxx-0.1.0-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-29 21:28:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oneryalcin",
    "github_project": "python-doxx",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-doxx"
}
        
Elapsed time: 1.62190s