Skip to main content

hwpforge

Read, edit and generate Korean HWP/HWPX documents from Python.

hwpforge wraps the HwpForge Rust library: a document model for the HWPX (OWPML) format, an HWP5 reader, a Markdown bridge and a PDF renderer. The Python package is a thin layer over that library, so the operations, their option names and their error codes are the same ones the command line tool and the MCP server use.

What it reads and writes

Reads .hwpx, and .hwp (HWP5) through hwpforge.convert_hwp5. That conversion is one way: the result is an HWPX document, and the original .hwp is never written back.

Writes .hwpx only. There is no .hwp output, and Hancom Office opens .hwpx natively. Documents also export to Markdown, JSON and PDF. A PDF needs the document's own fonts present on the host, passed through font_dirs, because nothing is substituted for a font that is missing.

Install

pip install hwpforge

With uv: uv add hwpforge in a project, or uv pip install hwpforge in an environment.

Pin with ~= rather than ==. A Python-only fix ships as X.Y.Z.N, and an exact pin never receives it.

What is published

Artifact Platform Needs
cp39-abi3-manylinux_2_28_x86_64 Linux x86_64 glibc 2.28 or newer
cp39-abi3-manylinux_2_28_aarch64 Linux aarch64 glibc 2.28 or newer
cp39-abi3-macosx_11_0_arm64 macOS arm64 macOS 11 or newer
cp39-abi3-macosx_10_12_x86_64 macOS x86_64 macOS 10.12 or newer
cp39-abi3-win_amd64 Windows x64 —
hwpforge-<version>.tar.gz source distribution Rust 1.92 and maturin

One abi3 wheel per platform covers CPython 3.9 and newer. Free-threaded builds are not supported, because the stable ABI does not cover them.

Hosts without an index

The wheel is a zip file and the package declares no runtime dependencies, so it can be unpacked and imported without pip. On Debian 12 (glibc 2.36) or anything newer:

python3 -c "import zipfile; zipfile.ZipFile('hwpforge-<version>-cp39-abi3-manylinux_2_28_x86_64.whl').extractall('/opt/hf')"
PYTHONPATH=/opt/hf python3 -c "import hwpforge; print(hwpforge.__version__)"

For a workspace release, every wheel and the source distribution are also attached to the matching GitHub Release, so an air-gapped host can be served from there instead of from PyPI. A Python-only fix, versioned X.Y.Z.N, is published to PyPI alone and has no Release of its own.

Example

import hwpforge

doc = hwpforge.Document.open("proposal.hwpx")
print(doc.outline()["outline"]["title"])
doc = doc.fill({"applicant": "홍길동", "date": "2026-09-17"}).document
doc.save("proposal-filled.hwpx")

Document is immutable. Every editing method returns a new document in a result object alongside the operation's report, and leaves the receiver unchanged, so the re-assignment above is not optional.

Documentation

License

MIT OR Apache-2.0.

Metadata

Release files for hwpforge 0.16.5

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

Source distribution (sdist)

Source distribution for hwpforge 0.16.5
File Size Uploaded
hwpforge-0.16.5.tar.gz 2.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for hwpforge 0.16.5
File
hwpforge-0.16.5-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
hwpforge-0.16.5-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
hwpforge-0.16.5-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
hwpforge-0.16.5-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
hwpforge-0.16.5-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 27.5 MB

Release files / hwpforge-0.16.5.tar.gz

Download URL hwpforge-0.16.5.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
5ab0c9360a01ee15170fc1de5aed96d004fb19d428d627822be5f2142542f7ec
BLAKE2b-256 checksum
How to use checksums
d89c4ebc0771fd07daa5c5dd055a7a3fbd2a906ef6d81f72b27f22abc7fa2699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hwpforge-0.16.5-cp39-abi3-win_amd64.whl

Download URL hwpforge-0.16.5-cp39-abi3-win_amd64.whl
Size 5.4 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e079b2c7db545dd996e8714d7013fc0c9a3a2f1bccdf7386cb99ab649a230aa6
BLAKE2b-256 checksum
How to use checksums
a8d0b54c3430ff2b3a77da6ceeb80a797ec349551f80b2e52a4cda3a49914cd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hwpforge-0.16.5-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL hwpforge-0.16.5-cp39-abi3-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
7a6769d5fb650a6001e48d77e52dfd13b43f6ec064cdebe20208d492b5641273
BLAKE2b-256 checksum
How to use checksums
e1f54787ad9d196c81ce0f454c958e3f4d324d7f3a12d37fff3bbc07eac46ed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hwpforge-0.16.5-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL hwpforge-0.16.5-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0cbc4da2e69dc9122711af035de7e922f7df23f9a3a93205bbe64509b1aa770d
BLAKE2b-256 checksum
How to use checksums
49a7ab4b4d1fe507baec8b59949e99cbb6e1c01e7f9ad940e41b9193fa2e41ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hwpforge-0.16.5-cp39-abi3-macosx_11_0_arm64.whl

Download URL hwpforge-0.16.5-cp39-abi3-macosx_11_0_arm64.whl
Size 4.7 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a119d6fa1c4f54a0866c46b004f22a3a8a23d4e89e1a34bcd5daa578861cb09
BLAKE2b-256 checksum
How to use checksums
3b9cc9de77ff53bc230aded8795d40b30639adf3a5b4e40b6c86e03b3aec156c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hwpforge-0.16.5-cp39-abi3-macosx_10_12_x86_64.whl

Download URL hwpforge-0.16.5-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.0 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
dee418db04e85437f900591c8fb255c9527f4e2fe6c0b1e83f210704fdfcf083
BLAKE2b-256 checksum
How to use checksums
d8d7a1332c15fce368c3a9ce469db826bc07346f9fe9bb2bd046bc101186732e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.16.6

6 release files

This release

0.16.5 This release

6 release files

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