Registry / data / pyhwpx

pyhwpx

JSON →
library1.7.2pypypiunverified

pyhwpx is a Python module designed for automating Hancom HWP (Hangul Word Processor) documents. It leverages the `pywin32` package to interact with the HWP Automation API, providing a more intuitive and Pythonic interface compared to direct `win32com` usage. The library supports various document manipulation tasks such as text insertion, saving, and editing, and aims to add more shortcut methods for common HWP automation patterns. It is actively developed, with a current version of 1.7.2, and requires Python 3.9+ on a Windows operating system with Hancom HWP installed.

pip install pyhwpx
INSTALL
IMPORT
SIG · PYHWPX
P
pyhwpx
datapythonv1.7.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Hwp
from pyhwpx import Hwp

Initializes an HWP automation object, inserts text, saves the document, and then closes HWP. Ensure Hancom HWP is installed on your Windows machine.

from pyhwpx import Hwp # Connects to the most recently active HWP window. # If HWP is not running, it launches a new instance. hwp = Hwp() # Insert text into the document hwp.insert_text("Hello world from pyhwpx!") # Save the document hwp.save_as("./helloworld.hwp") # Quit HWP hwp.Quit()
Debug
Known issues
breakingpyhwpx is a Windows-only library and requires Hancom HWP (Hangul Word Processor) software to be installed on the system to function, as it relies on COM automation. It will not work on Linux, macOS, or without HWP installed.
fix
Ensure you are running on a Windows OS with Hancom HWP installed.
affects: All versions
gotchaThe library uses a mixed naming convention: PascalCase for methods directly wrapping HWP Automation API functions and snake_case for custom utility methods. This can lead to `AttributeError` if the wrong casing is used.
fix
Refer to the documentation or source code for the correct casing of specific methods. Prioritize PascalCase for direct HWP API calls.
affects: All versions up to 1.7.2 (developer plans future refactoring)
breakingVersion 1.0.0 introduced significant internal module reorganization (e.g., separation into `core`, `param_helpers`, `run_methods`). Code written for pre-1.0.0 versions may break due to changed import paths or internal structures.
fix
Update your code to align with the new module structure and API changes introduced in version 1.0.0 and later.
affects: <1.0.0 to >=1.0.0
breakingThe `hwp.find` method had its `SeveralWords` parameter's default value changed from 1 to 0, and `FindString` became an optional parameter in version 1.2.1. This can alter the behavior of existing search logic.
fix
Explicitly set `SeveralWords=1` if you rely on the old behavior, and adjust `FindString` usage as needed.
affects: <1.2.1 to >=1.2.1
Upgrade
Version history
1.7.2latest on PyPI · released Mar 19, 2026
Audit
Dependencies
pywin32requiredRequired for Windows COM automation to interact with Hancom HWP.
Agent activity
18 hits · last 30 days
node
14
Resources
pyhwpx — pip install pyhwpx · libregistry