Skip to main content

omna-pii-mask

The compiled detection engine behind Omna's PII features. This is the same unified Rust kernel that ships in the Omna Mac app and browser extension, exposed to Python as a single self-contained wheel.

It is the backend for pip install "omna[pii]" — you normally don't install it directly; the omna package depends on it.

What it does

A six-layer (L1–L6) detection pipeline over text:

  • Regex + rule layers — emails, phone numbers, cards, URLs, and 220+ secret rules (AWS keys, GitHub tokens, JWTs, …) with entropy checks.
  • Checksum-validated IDs — Luhn, IBAN, Verhoeff, NHS, and 30+ international formats, so a string that merely looks like an ID isn't flagged unless it validates.
  • On-device AI (L3) — an optional ONNX model that catches contextual PII regex can't (e.g. a bare prose name). Runs in-process on the same ONNX Runtime the wheel already links; downloads once on first use.

API

import omna_pii_mask

omna_pii_mask.mask("Email john@acme.com", model=False)   # -> {"masked": "...", "tokens": {...}}
omna_pii_mask.detect("SSN 123-45-6789")                   # -> [{"entity": ..., "confidence": ...}, ...]
omna_pii_mask.restore(masked_text, tokens)                # reverse the reversible tokens
omna_pii_mask.download_model()                            # pre-fetch the L3 model
omna_pii_mask.version()                                   # engine fingerprint (version+gitsha)

Reversible PII is replaced with stable tokens ([PERSON_1], [EMAIL_1], …). Secrets/credentials are always redacted irreversibly ([REDACTED:<KIND>]) and never written to the reversible token map.

Span start/end (in mask(...)["spans"] and detect(...)) are UTF-8 byte offsets, not Python string indices. Slicing text[start:end] is wrong as soon as a dash, emoji or accented letter comes before the span — use text.encode()[start:end].decode(), or mask(...)["masked"], which is already correct.

Distribution

Binary-only, proprietary. Wheels are built abi3 (one wheel per platform covers Python 3.9+). No source distribution is published — the Rust source is closed.

Metadata

Release files for omna-pii-mask 0.2.8

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

Built distributions (wheels)

Table of built distributions (wheels) for omna-pii-mask 0.2.8
File Interpreter ABI Platform
omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
omna_pii_mask-0.2.8-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details

Total release size: 31.4 MB

Release files / omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_x86_64.whl
Size 10.9 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
cb859e211e33f1e90ccbb86d6939403f6821481e2410bda402242d011447d4de
BLAKE2b-256 checksum
How to use checksums
4489342cfb3efe025dcb7af1f934db242cc9cf0d8ff987b5f3a5033fe345563e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL omna_pii_mask-0.2.8-cp39-abi3-manylinux_2_28_aarch64.whl
Size 11.4 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
2897fb0e478e78d7a6ceafa6c33a91be292315f5e766a61f0b189a450893c2bd
BLAKE2b-256 checksum
How to use checksums
12dfa07896c41c9c1c15de0f1322da5d475a637e57d57549e2856e4d0835b035
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / omna_pii_mask-0.2.8-cp39-abi3-macosx_11_0_arm64.whl

Download URL omna_pii_mask-0.2.8-cp39-abi3-macosx_11_0_arm64.whl
Size 9.0 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d4392dbdca9e4f2ad65f7c435b5aaaa261c6525d422a1996c817bef2351a26ca
BLAKE2b-256 checksum
How to use checksums
6438167d43a07b2d8fce2cdbb3d6fccdb537188daffb5a1330572c02925637d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for omna-pii-mask 0.2.8

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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