Skip to main content

wizarddocx Banner


Wizard Docx

PyPI - Version PyPI - Downloads/month License

WizardDocx is a Python library focused on text extraction from Microsoft Word documents.
It parses Word documents natively and can apply local OCR with Tesseract for embedded images or scanned pages inside 'docx'.
Legacy .doc is supported in read-only mode without OCR.


Contents


Installation

Requires Python 3.9+.

pip install wizarddocx

For OCR capabilities, ensure you have Tesseract installed on your system.


Quick start

import wizarddocx as wd

text = wd.extract_text("example.docx")
print(text)

Text extraction

Parameters

  • input_data: [str, bytes, Path]
  • extension: The file extension, required only if input_data is bytes.
  • pages: page selection for .docx.
    • Examples: 1, "1-3", [1, 3, "5-8"]
  • ocr: Enables OCR using Tesseract. Applies to DOCX and image-based files no for doc.
  • language_ocr: Language code for OCR. Defaults to 'eng'.

Examples

Basic:

import wizarddocx as wd

txt = wd.extract_text("docs/report.docx")

From bytes:

from pathlib import Path
import wizarddocx as wd

raw = Path("img.docx").read_bytes()
txt_img = wd.extract_text(raw, extension="docx")

Paged selection and OCR:

import wizarddocx as wd

sel = wd.extract_text("docs/big.docx", pages=[1, 3, "5-7"])
ocr_txt = wd.extract_text("scan.docx", ocr=True, language_ocr="ita")

Supported Formats

Format OCR Option
DOC Not available
DOCX Optional

License

AGPL-3.0-or-later.

RESOURCES


Contact & Author

Author: Mattia Rubino
Email: textwizard.dev@gmail.com

Metadata

Release files for wizarddocx 1.0.0

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

Source distribution (sdist)

Source distribution for wizarddocx 1.0.0
File Size Uploaded Provenance Actions
wizarddocx-1.0.0.tar.gz 47.9 kB Without provenance Details for wizarddocx-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wizarddocx 1.0.0
File Interpreter ABI Platform Actions
wizarddocx-1.0.0-py3-none-any.whl Python 3 none any Details for wizarddocx-1.0.0-py3-none-any.whl

Total release size: 85.7 kB

Release files / wizarddocx-1.0.0.tar.gz

Download URL wizarddocx-1.0.0.tar.gz
Size 47.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7429c9dbca1785f425d860026aa096824ffe059c7f7970c529db94d8d8b7f034
BLAKE2b-256 checksum
How to use checksums
6ac26170740936f0e860b285c67baefe9ab417504ad47f2b53cec274e329a873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Release files / wizarddocx-1.0.0-py3-none-any.whl

Download URL wizarddocx-1.0.0-py3-none-any.whl
Size 37.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9dc07be615608e88094dd69d75cd764144e970749363ba7713f8d5075286f61
BLAKE2b-256 checksum
How to use checksums
0def0086ac5d2dceb4e9ad7ac8ae2d885413bade5a90e256dd364eba512cccb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Security for wizarddocx 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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