Skip to main content

saklam

Erkennt und maskiert personenbezogene Daten in deutschem Text (plus EN, FR, ES, IT, NL, PL) — lokal, im eigenen Prozess. Dieselbe Engine, die die Saklam-App und die Saklam-Bridge (Docker) fahren, mit demselben Platzhalter-Format und demselben Lizenzschlüssel.

Installation

pip install saklam

Das mitgelieferte NER-Modell (saklam-model-de-small) kommt mit — danach läuft alles ohne weiteren Download. Python 3.10–3.12.

Kein torch, kein CUDA. Das Modell rechnet direkt in ONNX Runtime; die Installation ist rund 300 MB (frische Umgebung, inklusive Modell: macOS 295 MB, linux/amd64 321 MB, linux/arm64 310 MB). Pflicht-Abhängigkeiten: onnxruntime, tokenizers, numpy, pydantic, pyyaml, cryptography.

Geprüft auf macOS arm64, Linux amd64/arm64 und Windows amd64 (Linux in Docker python:3.11-slim, Windows und die x86-Kernel in der GitHub-Matrix).

Still gekürzt wird nie: steht kein Modell zur Verfügung, arbeitet saklam ausdrücklich im Regex-Modus (engine_id == "regex", Grund in license_status().note). Und wenn ein Modell zwar lädt, auf dieser Maschine aber nichts findet, bricht saklam beim Laden mit SelfTestError ab, statt kommentarlos ohne Namen weiterzumachen — ein fester Kanon-Satz geht dafür einmal durch das Modell (Notausgang: SAKLAM_SKIP_SELFTEST=1).

0.1.0-Nutzer bitte aktualisieren. Das dort gebündelte Modell war U8S8 quantisiert und fand auf x86-CPUs ohne VNNI (AMD EPYC/Zen 3-4, ältere Intel) gar keine Namen, Organisationen und Orte — ohne Warnung. 0.1.1 liefert die U8U8-Fassung, die auf diesen CPUs nachweislich rechnet; auf CPUs mit VNNI kostet sie rund doppelte Rechenzeit. Details in CHANGELOG.md.

In drei Zeilen

from saklam import Saklam

pii = Saklam(license_key="sk-lic-…")                     # oder SAKLAM_LICENSE_KEY
r = pii.mask("Philip Müller aus Zürich, philip@example.org")
r.masked        # '[PER_1864ad4c] aus [LOC_2350dca1], [EMA_c85d5952]'
pii.unmask(r.masked, r.mapping)   # Original zurück

Dazu: pii.detect(text) für die Spans, pii.license_status() für den Zustand und die Kommandozeile saklam mask | detect | license | models.

Zero-Knowledge

Text und Erkennungsergebnisse verlassen den Host nie. Über das Netz geht ausschliesslich der Lizenzschlüssel gegen den Token-Endpunkt; die Prüfung des kurzlebigen, Ed25519-signierten Tokens läuft danach bei jedem Aufruf offline gegen den im Paket eingebetteten Public Key. Kein Phone-Home pro Aufruf, keine Telemetrie, keine Logs mit Rohtext.

Logsiegel-Adapter

Logsiegel (Apache-2.0) schreibt manipulationserkennbare Protokolle für KI-Systeme und kann gespeicherte Inhalte vor dem Verschlüsseln maskieren. Der Adapter dafür liegt hier im Paket, nicht in Logsiegel:

from logsiegel.core import Logsiegel
from saklam.integrations.logsiegel import SaklamDetector

ls = Logsiegel("/var/lib/logsiegel/prod", pii_detector=SaklamDetector())

pip install "saklam[logsiegel]" zieht Logsiegel mit. Datumsangaben bleiben per Default unmaskiert (skip_types). Bis Logsiegel 0.1.2 hieß der Import logsiegel.integrations.saklam; der Umzug ändert nur die Importzeile.

Lizenz

Proprietär. Nutzung nur mit gültigem Saklam-Lizenzschlüssel: 99 EUR/Monat, ein Key für alle Formfaktoren — pip-Paket, Docker-Bridge und App. Ohne gültiges Token lehnen detect() und mask() ab.

Der Lizenz-Token liegt im Cache unter ~/.cache/saklam/license/ — auf macOS und Linux mit 0600 in einem 0700-Verzeichnis. Unter Windows gibt es diese Bits nicht; dort liegt die Datei wie jede andere Profildatei und erbt die Rechte des Benutzerprofils (Empfehlung: BitLocker und die üblichen Profilrechte).

Schlüssel und Details: https://saklam.com · Doku: https://saklam.com/en/docs · Handbuch (Modell-Leiter, Regex-Modus, Grenzen, Air-Gap): docs/HANDBUCH.md im sdist · Änderungen: CHANGELOG.md.


English: Local PII detection and masking for German-language text, same engine as the Saklam app and the Saklam Bridge. Text never leaves the host — only the license key is exchanged for a short-lived token, verified offline on every call. Commercial license, 99 EUR/month, one key for every form factor. Docs: https://saklam.com/en/docs.

Metadata

Release files for saklam 0.1.2

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

Source distribution (sdist)

Source distribution for saklam 0.1.2
File Size Uploaded Provenance Actions
saklam-0.1.2.tar.gz 466.2 kB With provenance Details for saklam-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for saklam 0.1.2
File Interpreter ABI Platform Actions
saklam-0.1.2-py3-none-any.whl Python 3 none any Details for saklam-0.1.2-py3-none-any.whl

Total release size: 946.5 kB

Release files / saklam-0.1.2.tar.gz

Download URL saklam-0.1.2.tar.gz
Size 466.2 kB
Tags Source
SHA-256 checksum
How to use checksums
09467afbe686bf09da5acbfdc141ea6f4a07414dd50818ff5d7a3c462f5bf87e
BLAKE2b-256 checksum
How to use checksums
d6a996de9b5b37ec5524ad1c185c9ec711cdb7b96fb640b13cf4b99353764dcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / saklam-0.1.2-py3-none-any.whl

Download URL saklam-0.1.2-py3-none-any.whl
Size 480.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07fdc246e05015586243451768b6339307861ea25b241e2dc7a83a70151da233
BLAKE2b-256 checksum
How to use checksums
f58637541032e3ddb24d3a4caa672825bb136dfa26c26af4bbf82dc6d2d26e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for saklam 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for saklam-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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