FastPII Connect
Client SDK for the FastPII AI Data Security Platform.
FastPII detects and protects sensitive information before it reaches AI systems, enabling organisations to use AI securely while meeting privacy and governance requirements.
Installation
pip install fastpii-connect
Quick Start
from fastpii_connect import FastPIIClient
client = FastPIIClient(api_key="fpk_your_api_key")
# Detect PII
result = client.detect("My rodné číslo is 900101/1234")
for entity in result.entities:
print(f"Found {entity.type}: {entity.original}")
# Protect PII
result = client.protect("My rodné číslo is 900101/1234", mode="replace")
print(result.protected_text)
# Validate an identifier
result = client.validate("900101/1234", entity_type="rodne_cislo")
print(f"Valid: {result.valid}")
# List available detectors
detectors = client.list_detectors(country="CZ")
for d in detectors.detectors:
print(f"{d.name}: {d.description}")
Context Manager
with FastPIIClient(api_key="fpk_your_api_key") as client:
result = client.detect("Hello world")
Session Management
client = FastPIIClient(api_key="fpk_your_api_key")
session = client.create_session()
result1 = session.detect("My rodné číslo is 900101/1234")
print(session.countries) # ["CZ"]
result2 = session.detect("My PESEL is 90010112345")
print(session.countries) # ["CZ", "PL"]
Error Handling
from fastpii_connect.errors import (
AuthenticationError,
RateLimitError,
QuotaExceededError,
ValidationError,
)
try:
result = client.detect("text")
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after} seconds")
except QuotaExceededError:
print("Monthly quota exceeded")
License
MIT — see LICENSE file.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastpii_connect-0.3.1.tar.gz
(57.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastpii_connect-0.3.1.tar.gz.
File metadata
- Download URL: fastpii_connect-0.3.1.tar.gz
- Upload date:
- Size: 57.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Deepin","version":"25","id":"crimson","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c9b4cb0677226972d66971e34e9e9714183a79d12d1853c1cbbc0c5f3daa128
|
|
| MD5 |
c0907ee6bb1c45030a233a4a3bbdf1d1
|
|
| BLAKE2b-256 |
2d274ed2024eed1c4671c3724c753e730f184d88cc3f0dcf0e85dbd26f7205f4
|
File details
Details for the file fastpii_connect-0.3.1-py3-none-any.whl.
File metadata
- Download URL: fastpii_connect-0.3.1-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Deepin","version":"25","id":"crimson","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eea918b6ffaa52cc3d4615d4ee0438ac5c2d8f344f87fbfc067b95cc54a952c
|
|
| MD5 |
dac4be1cdc7378ea6facd32634ab4537
|
|
| BLAKE2b-256 |
e17773f8299e48262aad244a579489f303e54ccd74f75c3f5da45e4b27a372cc
|