Skip to main content

libhwp

rust로 작성된 python hwp 리더 라이브러리

본 제품은 한글과컴퓨터의 한/글 문서 파일(.hwp) 공개 문서를 참고하여 개발하였습니다.

hwp-rs와 hwppy를 공개합니다

API

find_all

  • hwp
  • hwp.sections[i]
  • hwp.sections[i].paragraphs[i] 등에서 사용할 수 있습니다.

find_all('tag', recursive=Boolean)이며 recursive는 기본적으로 True입니다.

지원되는 tag

  • paragraph: 문단
  • table: 표
  • caption: 캡션
  • equation: 수식
  • footnote: 각주
  • endnote: 미주
  • header: 머리말
  • footer: 꼬리말

예

from libhwp import HWPReader

hwp = HWPReader('<파일 경로>')

# 모든 문단 출력 (표, 캡션 포함)
for paragraph in hwp.find_all('paragraph'):
    print(paragraph)

# 표 내용 출력 (표 안의 표 포함)
for table in hwp.find_all('table'):
    for cell in table.cells:
        for paragraph in cell.paragraphs:
            print(paragraph)

# 표 내용 출력 (표 안의 표 무시)
for table in hwp.find_all('table', recursive=False):
    for cell in table.cells:
        for paragraph in cell.paragraphs:
            print(paragraph)

# 표 안의 표 내용 출력 방법 2
for table in hwp.find_all('table'):
    for cell in table.cells:
        for paragraph in cell.paragraphs:
            print(paragraph)

            # paragraph에서도 recursive 하게 찾을 수 있다
            for p in paragraph.find_all('paragraph'):
                print(p)

# 수식 내용 출력
for equation in hwp.find_all('equation'):
    print(equation.script)  # eg. f(x)= logx+sinx

# 문서에 사용된 파일 저장
for file in hwp.bin_data:
    with open(file.name, 'wb') as f:
        f.write(file.data)

Metadata

Release files for libhwp 0.1.0

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

Source distribution (sdist)

Source distribution for libhwp 0.1.0
File Size Uploaded Provenance Actions
libhwp-0.1.0.tar.gz 2.9 MB Without provenance Details for libhwp-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for libhwp 0.1.0
File Actions
libhwp-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.9 PyPy 3.9 7.3 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.8 PyPy 3.8 7.3 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details for libhwp-0.1.0-cp310-none-win_amd64.whl
libhwp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.9+ x86-64 Details for libhwp-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
libhwp-0.1.0-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details for libhwp-0.1.0-cp39-none-win_amd64.whl
libhwp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.9+ x86-64 Details for libhwp-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
libhwp-0.1.0-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details for libhwp-0.1.0-cp38-none-win_amd64.whl
libhwp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details for libhwp-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
libhwp-0.1.0-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details for libhwp-0.1.0-cp37-none-win_amd64.whl
libhwp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for libhwp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
libhwp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.9+ x86-64 Details for libhwp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Total release size: 17.3 MB

Release files / libhwp-0.1.0.tar.gz

Download URL libhwp-0.1.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ebf61fb563ce85e77fac87d5b8a756670f8e7599493d1d2ef588c3b835fa1548
BLAKE2b-256 checksum
How to use checksums
a53483319f603bb5f23ca1a73a88094e9fc86d8d77cbbf9d3b66e324ef128078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3
SHA-256 checksum
How to use checksums
2a6994e7a73df1f1800e909f6e7c54ca21576b2ec8399787af8c3946fd849b37
BLAKE2b-256 checksum
How to use checksums
2cdfe7f3bf6f066a2b42e09794d5af70e8ae05647ac0652e545131fe97d1fc29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3
SHA-256 checksum
How to use checksums
e56a533efe1771056bf8de6aebc2139bea9a02fd3c69fe643150e48a175a9ffa
BLAKE2b-256 checksum
How to use checksums
f10bf127fad89822ce5ec582e7e030561a0780f7d85fe2b97778ca18178ac48a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
aff2f569c1f00fc48d62dde25c2eb9edcc2a8e02022501828325e1b4146ade9d
BLAKE2b-256 checksum
How to use checksums
6cbbbc2a3f3706bc89206199e9280c244f2ade33bb4aec680f3215e02a69261a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
176ed3c49837d36bbdb2b596d6f2e5f15c94beee342264d82f2471f5f8f7a5b6
BLAKE2b-256 checksum
How to use checksums
faaab9b7104f7540c7181a06fe0c3701f4aa9abb52dc7d45d3ddf4bd04fbee2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp310-none-win_amd64.whl

Download URL libhwp-0.1.0-cp310-none-win_amd64.whl
Size 314.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
82d9b46d363b5bf4221e965e1075cc81b4f48835baba42d757d03c27976408dc
BLAKE2b-256 checksum
How to use checksums
62bcba6af2b3bdf0a0b90e3e2df53450a377eb2b259236c12bda23c1486222c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1eb556c8fd8fb2e8a6f8f902747b43e58009651aa7259f93be460c3516b274b4
BLAKE2b-256 checksum
How to use checksums
eeaf58267e81fd40bd37556f08193fd196fed2c9a8cb6384d06478203608a67c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL libhwp-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 822.1 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6c18a93cd3970f9f4b580ad8ec52e242ded2bec8d7348dc31c3a2e217341ad26
BLAKE2b-256 checksum
How to use checksums
852bc73e3222fa5e20e266bc2427fdd5d1e16ca9ccc4fab8e9395a1773d9bc85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp39-none-win_amd64.whl

Download URL libhwp-0.1.0-cp39-none-win_amd64.whl
Size 314.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
d5fc23039c907d535b5e28887cc03fde6346f97cc84c247e52cc44f91db5e10e
BLAKE2b-256 checksum
How to use checksums
7afea8bacfe861a24f11d5d3b3efb87645e64f6a3c96229b11d562ebd84c5ce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
86ea049361550ad9d8fb253e5dbe597c0ad0ee7e94153c1336c9738a4260e63d
BLAKE2b-256 checksum
How to use checksums
867599abed64b57fd41dbf5c3eae67f1ee5544269e3037f268248fb7abc5cf7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL libhwp-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 822.9 kB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
283098bb96dc03dcbe92f6f7cdad562a64c0c7f3726617811ad88392517ae333
BLAKE2b-256 checksum
How to use checksums
b0eaf4d1e2d03bd47c1766cb8b9e84353f96ab37e37d07a9cd839e608ab68e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp38-none-win_amd64.whl

Download URL libhwp-0.1.0-cp38-none-win_amd64.whl
Size 314.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
f098e68be8c9469ed34641e362de7951e6cd508c99301fb2624ba2aeb8c0d213
BLAKE2b-256 checksum
How to use checksums
ceabffe41ebb083aa2ee0fe41e1fe973c67b2ef89275ec1f331177f48e00623e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8396b351af5615309c759d975a2607ea3487f1aea4bbcbd20b662aa34fb343fb
BLAKE2b-256 checksum
How to use checksums
0e37f2de8ef23ee315b318e12bf83c765e54e0a50a0d16500fd64b4cec068e96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL libhwp-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 822.6 kB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a521cb4f33a6b439071c3eac8ed74a232655f063941ce393d480b6563d82a942
BLAKE2b-256 checksum
How to use checksums
169034fdf5a34b27a98c0a9fa461aa00c4fc2c0a97cc3756180c86a5232aa420
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp37-none-win_amd64.whl

Download URL libhwp-0.1.0-cp37-none-win_amd64.whl
Size 314.8 kB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
3fee0ae8ad71ee5ff45bb8b900ab32af10aeb939b5a518720a484202f4a103fb
BLAKE2b-256 checksum
How to use checksums
f51e09c61b7101e97a6afa931a6e192b63ccf2fe599530e0d1e7b54ffef9f304
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libhwp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e26538f2a2779451d25c675f0558b402825dc153e4064eb01ebbc4ea387e938c
BLAKE2b-256 checksum
How to use checksums
4aaaaacbc9e046f65f350615a0cccbf46e439fcc57510667f8e02273b91f77b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / libhwp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL libhwp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 822.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f3cee409508f45c1e9bcb3ddf56009543504c391ea844c277d9c183dfb835d89
BLAKE2b-256 checksum
How to use checksums
3c4b11f58881193400f856ea28f091643a3d8ffb4fe5d94786df8582bfc206ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Security for libhwp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

17 release files No provenance

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