--- id: python-hwpx version: "6.0.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # python-hwpx — 한글 없이 HWPX 문서를 열고, 편집하고, 생성하고, 검증하는 Python 문서 라이브러리 License: permissive · Maintenance: active · Downloads: 110.4K/mo ## What it is and what it does python-hwpx is a pure-Python library for reading, editing, and creating HWPX documents—the XML-based format used by Hancom Office (Korean word processor). It eliminates the need to install Hancom Office itself, making HWPX manipulation available on any platform where Python runs, including Linux, macOS, Windows, and AI chat environments. The library preserves document formatting and byte-level integrity when editing existing files, and generates new documents that open correctly in Hancom Office. The package handles common document workflows: extracting text and exporting to HTML or Markdown, editing paragraphs and tables while preserving formatting, filling form templates by label-based cell lookup, generating new documents with styles and structure, and validating document integrity. It includes a safety contract for writes—if a requested preservation level cannot be met, the save fails without writing anything. A mutation report is returned with each save, documenting what changed and what was preserved. Use it for: - Automate form filling in HWPX templates by label lookup, preserving formatting and document structure. - Generate HWPX reports and documents programmatically in CI/CD pipelines without Hancom Office installed. - Use HWPX documents with AI agents (ChatGPT, Claude) to read, edit, and return documents while preserving formatting. - Extract text, tables, and metadata from HWPX files for data processing or archival without manual conversion. - Batch-process multiple HWPX documents on Linux/macOS servers where Hancom Office is unavailable. - Create mail-merge workflows that populate HWPX templates with data from external sources. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads, edits, and creates HWPX documents (Korean word processor format) in pure Python without requiring Hancom Office, supporting text extraction, form filling, and document generation across Windows, macOS, Linux, and AI environments. Yes, with conditions. Install if you need to work with HWPX documents in Python without Hancom Office, especially for automation, form filling, or AI integration. The low install friction, active maintenance, and permissive license support this. However, be aware the API is in Alpha and may change; pin the version if stability is critical. The documented test corpus (476+ files) and byte-preservation guarantees provide confidence for production use, but verify compatibility with your specific HWPX variants first. ## Install pip install python-hwpx uv add python-hwpx poetry add python-hwpx ## Installing python-hwpx Before you install: Installation is low-friction with a single runtime dependency (lxml). The package is actively maintained with a release just 3 days old and 104 repository stars, though it carries an Alpha development status, meaning the API may change. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most deployment scenarios. Quickstart: pip install python-hwpx from hwpx import HwpxDocument doc = HwpxDocument.new() doc.add_heading("Title", level=1) doc.add_paragraph("Content") doc.save_to_path("output.hwpx") Requires Python 3.10 or later. Verify before relying: - Performance characteristics when processing large HWPX files or batch operations. - Stability of the Alpha API across real-world production workflows beyond the documented test corpus. - Compatibility with HWPX files created by older versions of Hancom Office. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 110.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags hwpx document editing python, korean word processor library, hwpx reader writer, document automation hwpx, hancom office alternative python, form filling hwpx, xml document processing korean, document-automation, korean-office-format, ai-agent-integration [View on SkillFed](https://skillfed.io/packages/python-hwpx) · [View on PyPI](https://pypi.org/project/python-hwpx/)