Pythonic HWP(한컴 오피스) automation via win32com — slim App facade + doc.collections + hwpapi.low escape hatch
Project description
hwpapi
한글(HWP) 자동화를 위한 Pythonic 라이브러리. hwpapi.App 슬림 퍼사드 +
app.doc.* 컬렉션 + hwpapi.low.* escape hatch 의 이중 레이어 API.
📖 전체 문서는 JunDamin.github.io/hwpapi — 설치 · 5분 투어 · Guide · Recipes · API Reference · v1 → v2 마이그레이션.
Requirements
- Windows + 한컴 오피스 설치
- Python 3.9+
pywin32
Install
pip install hwpapi
5분 투어
from hwpapi import App
app = App() # HWP 연결
app.open("report.hwp")
# 컬렉션 — dict-like + iterable + filterable
app.doc.fields["name"] = "홍길동"
app.doc.bookmarks.add("ch1")
for tbl in app.doc.tables:
print(tbl.caption, tbl.rows, "×", tbl.cols)
# 문단/런
for para in app.doc.paragraphs:
print(para.style, "|", para.text[:40])
# Escape hatch — 저수준 actions / parametersets / engine
from hwpapi.low import actions, parametersets
char = parametersets.CharShape(app.actions.CharShape.pset)
char.bold = True
actions.CharShape(app).execute(char)
app.save()
더 많은 예제는 Recipes 를 참고하세요.
v1 → v2 변경점
v2 는 public API break 를 허용한 클린컷 릴리즈입니다.
| v1.x | v2.0 |
|---|---|
from hwpapi.core import App |
from hwpapi import App |
app.fields[...] |
app.doc.fields[...] |
app.bookmarks, app.images, ... |
app.doc.bookmarks, app.doc.images, ... |
app.charshape = {...} |
with hwpapi.context.charshape_scope(app, bold=True): ... |
app.preset.*, app.template.* |
(Phase-out — Recipes 페이지에서 레시피 형태로 재공급) |
hwpapi.parametersets |
hwpapi.low.parametersets |
전체 매핑 80+ 항목: Migration Guide
v1.x 에 머무르려면 pip install "hwpapi<2" 또는 git checkout v1.x.
기여
- 이슈/PR: github.com/JunDamin/hwpapi
- 아키텍처/의사결정: docs/design/adr/
License
MIT
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 hwpapi-2.0.0.tar.gz.
File metadata
- Download URL: hwpapi-2.0.0.tar.gz
- Upload date:
- Size: 199.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed07919aac8d18555429a8c8a5d31415c5ee1dcbbb8f2c769d59ed44539de237
|
|
| MD5 |
8d8661106c4358c876519c24827a27f6
|
|
| BLAKE2b-256 |
df6b0fffb2f6878a62804178629b8bb8cd0fe3d650c36c44734f3eb742261115
|
Provenance
The following attestation bundles were made for hwpapi-2.0.0.tar.gz:
Publisher:
publish.yaml on JunDamin/hwpapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hwpapi-2.0.0.tar.gz -
Subject digest:
ed07919aac8d18555429a8c8a5d31415c5ee1dcbbb8f2c769d59ed44539de237 - Sigstore transparency entry: 1395940375
- Sigstore integration time:
-
Permalink:
JunDamin/hwpapi@c7655c327d4dbb8d682aa438fad5be2b7e9834a4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/JunDamin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c7655c327d4dbb8d682aa438fad5be2b7e9834a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hwpapi-2.0.0-py3-none-any.whl.
File metadata
- Download URL: hwpapi-2.0.0-py3-none-any.whl
- Upload date:
- Size: 202.2 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 |
91c5e62bdcf1fc68f3862ed55d7b7d22c85596e8bb33ac0903610d6d01b5f5d9
|
|
| MD5 |
c4cf78de7c1a357237d2cd7a7ae1a86a
|
|
| BLAKE2b-256 |
ed7b472046e042e0ed082ab7266365acefa03ab23765660f7805e3eb424366c4
|
Provenance
The following attestation bundles were made for hwpapi-2.0.0-py3-none-any.whl:
Publisher:
publish.yaml on JunDamin/hwpapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hwpapi-2.0.0-py3-none-any.whl -
Subject digest:
91c5e62bdcf1fc68f3862ed55d7b7d22c85596e8bb33ac0903610d6d01b5f5d9 - Sigstore transparency entry: 1395940377
- Sigstore integration time:
-
Permalink:
JunDamin/hwpapi@c7655c327d4dbb8d682aa438fad5be2b7e9834a4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/JunDamin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c7655c327d4dbb8d682aa438fad5be2b7e9834a4 -
Trigger Event:
release
-
Statement type: