Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Zotniq SDK

PyPI version Python versions License

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 if api_key is set, local otherwise
  • mode="local" — always local, no network calls
  • mode="cloud" — always cloud, raises AuthError if 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.0a2.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zotniq-0.1.0a2-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file zotniq-0.1.0a2.tar.gz.

File metadata

  • Download URL: zotniq-0.1.0a2.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for zotniq-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 97cbf70c935f8566934d8f87d42ecaaec7ee922cd225c72ceebb964c5fc74ffa
MD5 5767cc96b837b63fe63f2a7fbececad2
BLAKE2b-256 316aaf088e983786b2910560f7cb6f58939e02b63680652b5e4005320aa54ce2

See more details on using hashes here.

File details

Details for the file zotniq-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: zotniq-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for zotniq-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d09c9dade872820b16fef3196ad545a5e7320d4421631b961cafc0ad810df70
MD5 b0e8fdbe6c004c55274c4224bf66941d
BLAKE2b-256 e24656c8818f12b658957b22dcd10af999fa418ece3e80fae50e5323f7bd728c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page