harupy
harupy는 한국어 조사 선택과 한글 숫자 표현을 위한 작고 의존성 없는 Python 라이브러리입니다.
설치
pip install harupy
Python 3.9 이상을 지원합니다.
조사 선택
String 객체의 josa()는 마지막 글자의 받침에 맞는 조사를 붙입니다.
from harupy import String
name1 = String('김수한무')
name2 = String('삼천갑자 동방삭')
name1.josa('이') # '김수한무가'
name2.josa('가') # '삼천갑자 동방삭이'
String('신세계').josa('이라는') + ' 영화 봤나요?'
# '신세계라는 영화 봤나요?'
으로/로는 받침 ㄹ에 대한 예외도 처리합니다.
String('작심삼일').josa('으로') # '작심삼일로'
String('작전변경').josa('로') # '작전변경으로'
속성으로 조사를 직접 적는 축약 문법도 사용할 수 있습니다.
String('오솔길').로 # '오솔길로'
String('호떡').이나 + ' 먹자' # '호떡이나 먹자'
String('떡볶이').이나 + ' 먹자' # '떡볶이나 먹자'
한글 숫자
숫자를 한글로 읽거나, 한글로 적힌 숫자를 정수로 변환합니다.
String(152000).to_hangul() # '십오만이천'
String('37501600').to_hangul() # '삼천칠백오십만천육백'
String(1110000).to_hangul(read_one=True) # '일백일십일만'
String('이천십팔').to_number() # 2018
String('천이백십일억천백만').to_number() # 121111000000
String('사천오백만').isnumeric() # True
다른 한글 도구
String('하루 Python').hangul_rate() # 22
String('하루, Python 3!').extract_readable() # '하루Python3'
String('오솔길').get_last_bachim() # 'ㄹ'
list(String('하루').normalize()) # ['ᄒ', 'ᅡ', 'ᄅ', 'ᅮ']
2.0에서 변경된 점
harupy 2.0은 한글 처리에 집중합니다. 이전 버전의 common, decorators, network, shell 모듈과 범용 텍스트 유틸리티는 제거했습니다.
String은 기존과 같이 harupy.text에서도 가져올 수 있지만, 새 코드에서는 다음 형태를 권장합니다.
from harupy import String
라이선스
Apache License 2.0
Release files for harupy 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| harupy-2.0.1.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| harupy-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / harupy-2.0.1.tar.gz
| Download URL | harupy-2.0.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6df6e1fad30b18ccebf2afb61313044044a06ef6c3937c8b080fe5d44a49d286
|
|
BLAKE2b-256 checksum How to use checksums |
6f84170662d2264a860368d2aafe3c20853ff204ea33ee5e6e4a7cdec6d66499
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / harupy-2.0.1-py3-none-any.whl
| Download URL | harupy-2.0.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
078ef4c66777b8073159c6d1327c28ee4538c994f3fe385a33608b89337c129c
|
|
BLAKE2b-256 checksum How to use checksums |
e94227fd23a113db7ed3dc47272deed7b6caa2dcf293ec1d38a891543f3aca3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency log