dumbtv
dumbtv가 ADB로 Fire TV에서 광고·추적·업데이트 알림을 제거, 루트·앱 변경 없이, 무료 오픈소스
piighost는 파이썬 라이브러리로, 개인식별정보를 정규식·NER·LLM으로 탐지해 안정적인 자리표시자로 교체합니다
piighost is a Python library to anonymize personally identifiable information before it reaches a large language model. Detect PII with regex, NER or an LLM, swap it for stable placeholders, and resto
보안Python · MakefileGitHub @Athroniaeth온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Protect personal data (PII) in your LLM prompts. piighost hides sensitive values from the model, then restores the real values in the response, so tools and the user still get the real data. Pluggable detectors (regex, NER, LLM), LangChain, Pydantic and LlamaIndex AI integrations, and a companion OpenAI/Anthropic proxy.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
piighost is a Python library that protects your personal data (PII) in conversations with LLMs through de-identification. Sensitive values are hidden before they are sent, then restored in the response. LangChain, Pydantic AI, LlamaIndex and Claude Code integrations are provided, together with an OpenAI and Anthropic API connector.
This de-identification spots PII with pluggable detectors (regex, NER, LLM) and replaces each value with a placeholder, the token that takes its place. For example:
• John Doe becomes >
• [email protected] becomes >README 전문 보기 ↗English | Français
piighost replaces personal data with placeholders before the LLM sees it, then restores the real values in the reply and in tool calls. This Python library de-identifies confidential data, meaning personal data (PII) and secrets, through a reversible pseudonymization often called anonymization. LangChain, Pydantic AI, LlamaIndex and Claude Code integrations are provided, together with an OpenAI and Anthropic API connector.
This de-identification spots confidential data with pluggable detectors (regex, NER, LLM) and replaces each value with a placeholder, the token that takes its place. For example:
John Doe becomes <<PERSON:1>>[email protected] becomes <<EMAIL:1>>This placeholder stays the same from one message to the next with the conversational pipeline, which keeps the mapping between a value and its placeholder across the whole conversation. If [email protected] reappears three messages later, the placeholder is still <<EMAIL:1>>, which lets the LLM follow the thread.
The LLM therefore only receives de-identified text. When it returns placeholders, for example by answering Hello <<PERSON:1>>, piighost replaces them with the real values. The user sees John Doe and never sees the de-identification.
The same mechanism protects agents that call tools. With the LangChain middleware, a tool that needs the real email address receives it in clear, while the LLM that supplies it only writes <<EMAIL:1>>.
The LLM only sees placeholders. The tool receives the real address, the user gets a clear-text reply, and your agent code stays the same.
[!NOTE] This retained mapping makes the de-identification a pseudonymization under the GDPR, not a definitive anonymization. With the conversational pipeline, the real values stay stored for the duration of the conversation and must be protected accordingly.
pip install piighost # or: uv add piighost
ExactMatchDetector de-identifies a dictionary of known values, with no model to download.
import asyncio
from piighost.components.detector import ExactMatchDetector
from piighost.pipeline import AnonymizationPipeline
detector = ExactMatchDetector({"John Doe": "PERSON", "[email protected]": "EMAIL"})
pipeline = AnonymizationPipeline(detector)
result = asyncio.run(pipeline.anonymize("Write to John Doe at [email protected]."))
print(result.text) # Write to <<PERSON:1>> at <<EMAIL:1>>.
The Quickstart goes on with a real detector and a conversation.
If piighost is useful to you, a star on GitHub helps other developers find it.