Pure-Python reader for Korean HWP 5.x and HWPX documents — text and tables. Clean-room, permissively licensed.
Project description
syhwp
Pure-Python reader for Korean HWP 5.x and HWPX documents — extracts text and tables, with no external services and a permissive license.
import syhwp
# convenience
text = syhwp.extract_text("report.hwp") # plain text
md = syhwp.extract_markdown("report.hwpx") # GFM markdown (tables as pipe tables)
# structured access
doc = syhwp.open("report.hwp") # -> Document
for table in doc.tables: # Table: n_rows, n_cols, cells[...]
print(table.to_markdown())
for para in doc.paragraphs: # Paragraph: text
print(para.text)
Format (HWP vs HWPX) is auto-detected. Works the same for .hwp and .hwpx.
Also available as a command line tool:
syhwp report.hwp # markdown (default); also --text / --html
python -m syhwp report.hwpx
Why
The existing Python options each have a blocking flaw for use in commercial or SaaS software:
| Library | License | Issue |
|---|---|---|
pyhwp |
AGPL-3.0 | Strong network copyleft — unusable in closed/SaaS products |
libhwp (hwp-rs) |
Apache-2.0 | Unmaintained (0.2.0), panics on real files, no 3.12+ wheels |
pyhwpx |
— | Windows-only (COM automation) |
syhwp fills the gap: pure Python, permissive (MIT), maintained, robust by
design (unknown/edge records are skipped rather than crashing).
Install
pip install syhwp
Only dependency: olefile (BSD). HWPX
parsing uses the standard library only.
Status
Alpha. See DESIGN.md for the architecture and roadmap.
- HWP 5.x — text and table extraction (tables reconstructed into GFM pipe
tables); equations surfaced as their script, images/drawings as
[그림]; document version exposed onDocument.version. - HWPX — text and table extraction.
- Robust by design: unknown records are skipped, and malformed / corrupt files
raise a
SyhwpErrorsubclass rather than crashing (fuzz-tested). - Password-protected / distribution (copy-protected) documents raise
EncryptedDocumentError(their body streams are encrypted and cannot be read).
Provenance / license note
syhwp is a clean-room implementation written from the publicly published
HANCOM HWP 5.0 binary format and OWPML (HWPX) specifications. It does not
derive from, or incorporate code from, the AGPL-licensed pyhwp. This is what
allows syhwp to be offered under the permissive MIT license.
License
MIT © 2026 sysphere
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file syhwp-0.0.5.tar.gz.
File metadata
- Download URL: syhwp-0.0.5.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d6721ec4822f349c2cbb958bee4ca4246437cdbcc03bbe40c6fd88d22c4dfdc
|
|
| MD5 |
96207d56e1df6f31ae42ad986f218e11
|
|
| BLAKE2b-256 |
2614df4c80d61d5b197a927b0b38fa64b2d97f66ca7a765e8767869dec6d5f8c
|
Provenance
The following attestation bundles were made for syhwp-0.0.5.tar.gz:
Publisher:
publish.yml on sysphere/syhwp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syhwp-0.0.5.tar.gz -
Subject digest:
4d6721ec4822f349c2cbb958bee4ca4246437cdbcc03bbe40c6fd88d22c4dfdc - Sigstore transparency entry: 2167175203
- Sigstore integration time:
-
Permalink:
sysphere/syhwp@74ce22e9463ca02a5a43a6ce88be79934c6d4594 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/sysphere
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74ce22e9463ca02a5a43a6ce88be79934c6d4594 -
Trigger Event:
push
-
Statement type:
File details
Details for the file syhwp-0.0.5-py3-none-any.whl.
File metadata
- Download URL: syhwp-0.0.5-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a66d8f4d97d5784f352c1cb6c953fa49540109241cf4e759c39c1c0878502aae
|
|
| MD5 |
fb11beab0f767c773a32d6b49717f592
|
|
| BLAKE2b-256 |
94e5e4bcead2977637756734f6c01deb5a93f5028e2a649bcbb8cd41f90cb896
|
Provenance
The following attestation bundles were made for syhwp-0.0.5-py3-none-any.whl:
Publisher:
publish.yml on sysphere/syhwp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syhwp-0.0.5-py3-none-any.whl -
Subject digest:
a66d8f4d97d5784f352c1cb6c953fa49540109241cf4e759c39c1c0878502aae - Sigstore transparency entry: 2167175214
- Sigstore integration time:
-
Permalink:
sysphere/syhwp@74ce22e9463ca02a5a43a6ce88be79934c6d4594 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/sysphere
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74ce22e9463ca02a5a43a6ce88be79934c6d4594 -
Trigger Event:
push
-
Statement type: