skillfed

python-hwpx

한글 없이 HWPX 문서를 열고, 편집하고, 생성하고, 검증하는 Python 문서 라이브러리

python-hwpx v6.0.3 110.4K downloads/30d#12,461 on PyPI104
Permissive license Apache-2.0 Active released

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 on this page — 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

python-hwpx on PyPI

pip

pip install python-hwpx

uv

uv add python-hwpx

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — lxml
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 110,440/month — #12,461 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_hwpx-6.0.3-py3-none-any.whl

Keywords: hwp, hwpx, hancom, opc, xml, document-automation, validation, template

Development Status :: 3 - AlphaIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Text Processing :: Markup :: XMLTyping :: Typed

Tags

hwpx document editing pythonkorean word processor libraryhwpx reader writerdocument automation hwpxhancom office alternative pythonform filling hwpxxml document processing korean
document-automationkorean-office-formatai-agent-integration

More Libraries packages