piigpt
Provides a mechanism to anonymize PII and PHI before sending to a LLM API
Basic Setup:
from Analyzers.AnalyzerType import AnalyzerType
from PIIScrubber import PIIScrubber
def main():
from dotenv import load_dotenv
load_dotenv("sample.env")
pii = PIIScrubber(AnalyzerType.AZURE)
text = "My phone number is 555-555-5555"
print(pii.scrub([text]))
print(pii.get_entities([text]))
print(pii.anonymize(pii.get_entities([text]), text))
print(pii.deanonymize(pii.anonymize(pii.get_entities([text]), text)))
if __name__ == "__main__":
main()
Output: ['My phone number is ************'] [Text: 555-555-5555, Category: PhoneNumber, Subcategory: None, Offset: 19, Length: 12] My phone number is :yudDNDuGJG: My phone number is 555-555-5555
Extensible
Analyzers:
Currently AzureAIAnalyzer is supported. Contribute by adding additional analyzers following the BaseAnalyzer interface. Configure your parameters for your analyzer in the analyzer_config.toml file
Anonymizers:
Plug in your own anonymizer or use the built in Anonymizer. Change how the built in anonymizer anonymizes entities by changing the anonymizer_config.toml file or use the defaults.
CacheProviders:
Use the built in dictionary cache provider or insert your own CacheProvider following the BaseCache interface. Cache ensures all PII is deleted in a timely manner
Metadata
Release files for piigpt 0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| piigpt-0.13.tar.gz | 2.7 kB | Without provenance | Details for piigpt-0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| piigpt-0.13-py3-none-any.whl | Python 3 | none | any | Details for piigpt-0.13-py3-none-any.whl |
Total release size: 5.5 kB
Release files / piigpt-0.13.tar.gz
| Download URL | piigpt-0.13.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
112ba3359dcb1f863efc8882f3cb346d2c6bae663c3c3695aac6795e18a5a74a
|
|
BLAKE2b-256 checksum How to use checksums |
edf921b55a4680152576f59d3a5daafa200ab92223cbad8c67cac0816ec9995b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / piigpt-0.13-py3-none-any.whl
| Download URL | piigpt-0.13-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2384aea168b779c9b64af748c586869b23c0ee95a517e1487bed525fd211cc6
|
|
BLAKE2b-256 checksum How to use checksums |
bb03c2661b4237265313cddbf34d010135836da993c9e37a36e8386541a220df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for piigpt 0.13
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.