Skip to main content

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.

Metadata

Release files for fastpii-connect 0.3.1

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

Source distribution (sdist)

Source distribution for fastpii-connect 0.3.1
File Size Uploaded
fastpii_connect-0.3.1.tar.gz 57.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastpii-connect 0.3.1
File Interpreter ABI Platform
fastpii_connect-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 79.8 kB

Release files / fastpii_connect-0.3.1.tar.gz

Download URL fastpii_connect-0.3.1.tar.gz
Size 57.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0c9b4cb0677226972d66971e34e9e9714183a79d12d1853c1cbbc0c5f3daa128
BLAKE2b-256 checksum
How to use checksums
2d274ed2024eed1c4671c3724c753e730f184d88cc3f0dcf0e85dbd26f7205f4
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / fastpii_connect-0.3.1-py3-none-any.whl

Download URL fastpii_connect-0.3.1-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9eea918b6ffaa52cc3d4615d4ee0438ac5c2d8f344f87fbfc067b95cc54a952c
BLAKE2b-256 checksum
How to use checksums
e17773f8299e48262aad244a579489f303e54ccd74f75c3f5da45e4b27a372cc
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.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