Skip to main content

common-hj3415 README

common-hj3415는 프로젝트 간 공통으로 사용하는 경량 유틸리티 라이브러리입니다.
문자열 정리, 숫자 변환, 시간 정규화, 딕셔너리 일부 추출 같은 반복 로직을 한 곳에 모아 재사용할 수 있게 제공합니다.

pyproject.toml 기준 정보:

  • 패키지명: common-hj3415
  • 버전: 0.2.2
  • Python: >=3.11
  • 빌드 백엔드: flit_core
  • 의존성: contracts-hj3415

1. 프로젝트 기능 설명

이 프로젝트는 비즈니스 로직 패키지가 아니라 “공통 도구 모음” 역할을 합니다.

주요 기능:

  • 문자열 정규화: clean_text
    • None -> ""
    • NBSP 제거
    • 연속 공백 축소
  • 숫자 처리: to_float, parse_number_token, nan_to_none
  • 시간 처리: utcnow, to_utc
  • 디버깅/출력 보조: head_dict

이런 유틸을 공통 패키지로 분리하면, 여러 프로젝트에서 동일한 데이터 정리 규칙을 유지하기 쉽습니다.

2. 프로젝트 구조 설명

common-hj3415/
├─ pyproject.toml
└─ src/common_hj3415/
   ├─ utils/
   │  ├─ strings.py   # clean_text
   │  ├─ numbers.py   # to_float, parse_number_token, nan_to_none
   │  ├─ time.py      # utcnow, to_utc
   │  └─ etc.py       # head_dict
   ├─ domain/         # 현재는 빈 스켈레톤(확장용)
   └─ py.typed

utils는 실제 사용 코드가 들어 있고, domain은 향후 공통 도메인 규칙 확장을 위한 자리입니다.

3. 다른 프로젝트에서 임포트해서 사용하는 예시

설치:

python -m pip install common-hj3415

문자열/숫자/시간 유틸 사용 예시:

from datetime import datetime

from common_hj3415.utils.numbers import to_float
from common_hj3415.utils.strings import clean_text
from common_hj3415.utils.time import to_utc

name = clean_text("  삼성전자\xa0 ")
price = to_float("1,234.50")
asof = to_utc(datetime(2026, 3, 29, 12, 0, 0))

print(name)   # "삼성전자"
print(price)  # 1234.5
print(asof)   # 2026-03-29 12:00:00+00:00

딕셔너리 일부만 출력할 때:

from common_hj3415.utils.etc import head_dict

d = {"a": 1, "b": 2, "c": 3, "d": 4}
print(head_dict(d, n=2))  # {"a": 1, "b": 2}

4. 참고 사항

  • 이 패키지는 CLI를 제공하지 않는 라이브러리입니다.
  • 현재 코드 기준으로 별도 환경변수 설정이 필요하지 않습니다.
  • 단독 실행 서비스가 아니므로 Docker 실행 섹션은 포함하지 않았습니다.

Metadata

Release files for common-hj3415 0.2.4

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

Source distribution (sdist)

Source distribution for common-hj3415 0.2.4
File Size Uploaded
common_hj3415-0.2.4.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for common-hj3415 0.2.4
File Interpreter ABI Platform
common_hj3415-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / common_hj3415-0.2.4.tar.gz

Download URL common_hj3415-0.2.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f7c45a33c6d74f0a4b80aa1b800df82f42fe5f4de8b42bae39a7a9242f1f72fc
BLAKE2b-256 checksum
How to use checksums
11e0f76d64f50dcf4b114e46c080f99b34c1c0f8b026bff09627edeedffd2fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / common_hj3415-0.2.4-py3-none-any.whl

Download URL common_hj3415-0.2.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88d163dd9803baab96ddc0f7be14a0edac5285b0312cecb63c56ecff661af666
BLAKE2b-256 checksum
How to use checksums
5b191068119a9b9e7bd3572ea953fab5ef815fa49864e558084d78aba9f8d293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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