Skip to main content

korean-pii-gateway

LLM API로 나가는 요청에서 한국어 개인정보(주민등록번호·전화번호·계좌번호 등)를 탐지해 마스킹하거나 차단하는 셀프호스팅 OpenAI 호환 프록시 게이트웨이입니다. 탐지 엔진은 korean-pii를 사용합니다.

pip install korean-pii-gateway
uvicorn --factory korean_pii_gateway.app:create_app --port 8500

클라이언트는 base URL만 바꾸면 됩니다:

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8500/v1", api_key="sk-...")  # 키는 업스트림으로 패스스루
  • BYOK: Authorization 헤더를 업스트림에 그대로 전달하며 게이트웨이는 키를 저장하지 않습니다.
  • 감사 로그: 탐지 타입·개수만 JSONL로 기록 — 원문 개인정보 값은 절대 기록하지 않습니다.
  • fail-closed 기본: 검사 실패 시 요청을 차단합니다.
  • 환경변수(KPG_UPSTREAM_BASE_URL, KPG_ACTION 등)·Docker 배포·어댑터는 저장소 문서를 참고하세요.

중요: 이 게이트웨이는 보조 방어 계층입니다. 모든 개인정보 탐지를 보장하지 않으며, 법적 컴플라이언스 충족을 보장하지 않습니다.

Metadata

Release files for korean-pii-gateway 0.2.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 korean-pii-gateway 0.2.0
File Size Uploaded
korean_pii_gateway-0.2.0.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for korean-pii-gateway 0.2.0
File Interpreter ABI Platform
korean_pii_gateway-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.8 kB

Release files / korean_pii_gateway-0.2.0.tar.gz

Download URL korean_pii_gateway-0.2.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
31c7ff01ab7c1d357821f1828c33922bf220bfaca14133168261f413b9ade020
BLAKE2b-256 checksum
How to use checksums
952ccb427e6bd9950ad55f197e6454583b878cb010d3322ecd345e6e1e63b499
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 28, 2026.

Transparency log

Release files / korean_pii_gateway-0.2.0-py3-none-any.whl

Download URL korean_pii_gateway-0.2.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9c3da165cc01476c4e433ace73e88edb18a9190493fdd10e9354d5cb18d9d46
BLAKE2b-256 checksum
How to use checksums
9cd4c8e8eb571a7c19dc5d14637f32ecc233cbbbe815b75f2be6effc37fe84b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

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