Pre-release
This release is a pre-release and may not be stable for production use.
Zotniq SDK
Runtime data-loss prevention for AI applications. Detect, mask, and block sensitive data before it leaves your process — locally by default, cloud-augmented on request.
pip install zotniq
Quick start
from zotniq import Zotniq
# Local-only, no key required, zero network calls
client = Zotniq()
findings = client.detect("Contact bob@example.com")
# Cloud-augmented (server-side LLM contextual pass)
client = Zotniq(api_key="zot_sk_...")
result = client.preflight.check(
text="my ssn is 123-45-6789",
destination="AI_TOOL",
)
print(result.decision) # Decision.ALLOWED_WITH_MASKING
print(result.masked_text) # my ssn is XXX-XX-6789
Install with extras
pip install zotniq[openai] # OpenAI drop-in wrapper
pip install zotniq[siem] # SIEM forwarders (Splunk, Datadog, webhook, file)
pip install zotniq[all] # everything
Modes
mode="auto"(default) — cloud ifapi_keyis set, local otherwisemode="local"— always local, no network callsmode="cloud"— always cloud, raisesAuthErrorif no key
OpenAI drop-in
from zotniq import Zotniq
from zotniq.integrations.openai import wrap_openai
client = wrap_openai(Zotniq(api_key="zot_sk_..."), api_key="sk-...")
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "my ssn is 123-45-6789"}],
)
# SSN is automatically masked before OpenAI ever sees the prompt.
SIEM forwarding
from zotniq import Zotniq
from zotniq.siem import SplunkForwarder
client = Zotniq(
api_key="zot_sk_...",
on_decision=SplunkForwarder(
url="https://splunk.acme.com:8088/services/collector",
token="hec-token",
),
)
# Every preflight.check() call fires an async POST to your SIEM.
# Decision metadata only — never raw payload content.
Full documentation at docs.zotniq.ai/sdk.
License
Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zotniq-0.1.0a1.tar.gz
(30.4 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
zotniq-0.1.0a1-py3-none-any.whl
(42.6 kB
view details)
File details
Details for the file zotniq-0.1.0a1.tar.gz.
File metadata
- Download URL: zotniq-0.1.0a1.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96a062cbdd53c8d744402ed66bd18090610b49eca6b4e57443bddfcf92f8a3d4
|
|
| MD5 |
94bf82f834e2efd23fb5576bb4ccf4dc
|
|
| BLAKE2b-256 |
5438eadaa4a1fbc05579d1fdf449ab1b832acebf9edbd013ab7617f51470b101
|
File details
Details for the file zotniq-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: zotniq-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a80b560a467375c96e8e612a4500d7e85053b9f7a6831cec7bc60b0728cbd5
|
|
| MD5 |
b02396a02758d0b1bae5b5e2180faff3
|
|
| BLAKE2b-256 |
cb460189456bb5f1af1f53d0f84c33cba1f2cab25d886944bf9cb843437086dc
|