Zypp CLI
Internal CLI for Zypp: load secrets from Azure Key Vault and anonymize client files locally with Microsoft Presidio.
Installation
uv tool install zyppcli
To upgrade to the latest version:
uv tool install zyppcli --upgrade
Key Vault prerequisites
You need to be authenticated with Azure:
az login
Usage
Anonymize PDF, Excel or text files
Install Zypp CLI normally, then download both local spaCy models once:
uv tool install zyppcli
zypp anonymize --setup
To install from this checkout, use uv tool install . instead. To upgrade an
existing installation, use uv tool install zyppcli --upgrade. Setup installs the
Dutch and English models into the CLI's own environment, using uv when available
or pip otherwise. It can be run again safely. Downloading models requires network
access; anonymizing client files does not download anything.
Scanned PDFs and PDF pages with images or annotations also need local Tesseract
OCR and its Dutch (nld) and English (eng) language packs:
# macOS
brew install tesseract tesseract-lang
# Ubuntu/Debian
sudo apt-get install tesseract-ocr tesseract-ocr-nld tesseract-ocr-eng
# Check which language packs are available
tesseract --list-langs
zypp anonymize report.pdf
# -> report.anonymized.pdf
zypp anonymize customers.xlsx
# -> customers.anonymized.xlsx
zypp anonymize ./client-files
# -> ./client-files.anonymized/ (recursive, with relative file paths preserved)
zypp anonymize report.pdf --language en
zypp anonymize ./client-files --output ./review-copy
Dutch is the default. Processing uses local Presidio/spaCy/Tesseract engines; client files are not sent to cloud services. By default, detected values are replaced with synthetic data: fake names, example-domain emails, generated bank accounts and other values of the detected type. The same entity type and exact value receive the same replacement within one run; the in-memory mapping is not saved. Different runs generate new data.
# Default: fill detected fields with bogus data
zypp anonymize report.pdf
# Previous behavior: black PDF boxes and entity-label replacements in text/Excel
zypp anonymize report.pdf --redact
PDF originals are removed before replacement text is drawn, including text in
images. Unaffected native text stays selectable. Native replacements preserve the original
font size and baseline, using a built-in font with matching family/weight/style.
Scanned replacements estimate the size from OCR glyph bounds. Long fake values
are abbreviated with ... to fit the original field; they are never shrunk. No original text is left hidden
under the replacement. If a field cannot fit even one replacement character at
the original size, that field gets a black redaction and processing continues.
The CLI reports the number of such fields. A synthetic PDF field is not an editable
form widget.
Detection defaults to the personal profile: names, email addresses, phone
numbers, street addresses, Dutch postcodes, Dutch BSNs, IBANs and credit cards.
Organization names, general places, dates (including birth dates), ages and
nationality/religion labels are left alone. With the default Dutch language model,
this keeps ordinary business context
such as Anders, Loon, Vakantiebijslag, Amsterdam and 8 maanden.
Street-address detection covers common Dutch street-plus-house-number formats, English numbered streets, explicitly labelled address fields, and street/number lines followed by a Dutch postcode. A bare city or street name is not enough. Unusual address formats and addresses split across separate Excel cells can be missed. Person-name detections can still be incorrect; review the result.
For broader detection, including organizations and general places:
zypp anonymize report.pdf --profile all
Dates remain opt-in in both profiles. To include them, explicitly select
DATE_TIME alongside the other entity types you need. Recognized durations such
as 8 maanden or 8 months stay unchanged even with DATE_TIME selected.
For more specific tuning:
# Choose exactly which Presidio entity types to detect (overrides the profile)
zypp anonymize report.pdf --entities PERSON EMAIL_ADDRESS PHONE_NUMBER ADDRESS NL_POSTCODE NL_BSN IBAN_CODE
# Explicitly include calendar dates (entity selection overrides the profile)
zypp anonymize report.pdf --entities PERSON EMAIL_ADDRESS PHONE_NUMBER ADDRESS NL_POSTCODE NL_BSN IBAN_CODE DATE_TIME
# Discard detections below a Presidio score of 0.7
zypp anonymize report.pdf --profile personal --score-threshold 0.7
# Keep an exact detected phrase; repeat the option for more phrases
zypp anonymize report.pdf --allow-list Vakantiebijslag --allow-list Onregelmatigheids-
Settings apply to native PDF text, OCR, Excel, CSV and text/JSON alike. Allow-list
matches are exact and case-sensitive. The default score threshold remains 0,
keeping detections within the selected categories. Raising it is not a universal fix: spaCy
name/location/organization detections commonly share the same fixed score, so a
high threshold can discard real names as well as false positives. Start by choosing
the categories your use case needs; use an allow-list for known-safe exact phrases.
| Format | Result |
|---|---|
.pdf |
Preserves unaffected selectable text on native and mixed pages. Scans use OCR for detection and remain image content. Detected characters are deleted and matching image pixels are blanked before synthetic text is inserted; --redact uses black fills. Interactive forms, annotations, links and original document metadata are removed. |
.xlsx |
Fresh values-only workbook. All worksheets and hidden cells are processed; output tabs are named Sheet1, Sheet2, etc. Formulas, formatting, comments, links, drawings and original metadata are omitted. |
.csv, .tsv |
Properly quoted UTF-8 data with cell-level replacements. CSV uses commas; TSV uses tabs. |
.txt, .md, .log |
UTF-8 text with synthetic values, or entity labels with --redact. |
.json, .jsonl |
Valid JSON with processed keys and values. Colliding or duplicate keys are rejected. |
Excel formulas use the results saved by Excel. If a formula has no saved result,
the workbook fails with an instruction to recalculate and save it in Excel.
Numeric identifiers are scanned too; matched numbers become replacement strings.
Unmatched values retain their types, and text leading zeroes are preserved.
Custom Excel display formats such as 000000000 are not retained. Excel drawings
and embedded objects are omitted with a warning, rather than processed as images.
Originals are preserved. Rerunning replaces matching output files automatically; you do not need to delete earlier output first. Replacement is atomic: a failed rerun keeps the previous completed output. Folder reruns keep unrelated existing files. Source/output overlap and symbolic links are refused.
For folders, unsupported files are skipped. Failed new files have no final output,
and completed files are retained. A skipped or failed file makes the command exit
with status 1 and report a partial run. Temporary files and new output use
owner-only permissions where supported.
Dutch invoice coverage includes an IBAN-field fallback for OCR spacing/character
confusion and a targeted name recognizer for initials and a
surname after T.a.v. or Ter attentie van, plus Dutch VAT ID format detection
(NL_VAT) in broad mode. The personal profile includes the name recognizer but
omits VAT IDs unless explicitly selected through --entities. These focused rules
help with invoice fields; arbitrary names and addresses can still be missed.
Review output before sharing. Detection and OCR can miss personal data or
replace harmless text. Faces, signatures, indirect identifiers and every kind of
address or sensitive fact are not comprehensively detected. Filesystem names
remain unchanged and may themselves identify people. Legacy .xls, macro-enabled
Office files and password-protected PDFs are not supported.
For implementation details, see the anonymize plan.
List Key Vaults
zypp keyvault list --subscription <subscription-id>
Lists all accessible Key Vaults in the given Azure subscription.
To filter by name (case-insensitive substring match):
zypp keyvault list --subscription <subscription-id> --name dev
Load secrets from Azure Key Vault
eval $(zypp keyvault load --vault <vault-name>)
This fetches all enabled secrets from the specified vault and exports them as environment variables. Secret names are transformed: hyphens become underscores and the name is uppercased (e.g. db-password becomes DB_PASSWORD).
Without eval, the command only prints the export statements without setting them:
zypp keyvault load --vault <vault-name>
# Output:
# export DB_PASSWORD='...'
# export SQL_DB='...'
Version
zypp --version
Development and checks
uv sync
uv run --no-sync zypp anonymize --setup
uv run --no-sync pytest
uv run --no-sync pytest -m integration
uvx prek run --all-files
The default suite tests file handling and document adapters without spaCy models
or Tesseract. Integration tests require both language models, Tesseract and its
nld/eng packs; they exercise real detection, scans, mixed PDFs and the CLI.
Use --no-sync after setup: an exact uv sync removes model packages that
are not in the project lockfile. Run setup again if needed. CI runs both suites.
Metadata
Release files for zyppcli 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zyppcli-0.5.0.tar.gz | 201.1 kB | Without provenance | Details for zyppcli-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zyppcli-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for zyppcli-0.5.0-py3-none-any.whl |
Total release size: 224.9 kB
Release files / zyppcli-0.5.0.tar.gz
| Download URL | zyppcli-0.5.0.tar.gz |
|---|---|
| Size | 201.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21b53ae94cdf3df4da232650ec07ee74bf7a246f2f8a66fd27e66fecc91ccb12
|
|
BLAKE2b-256 checksum How to use checksums |
4ad86602eb8ebcfe544b166e910a4e7dd60660fd09901d922b369347e7247b47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / zyppcli-0.5.0-py3-none-any.whl
| Download URL | zyppcli-0.5.0-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
039e878901e4204775287410235f496eb502ad1ae477c7fd8260b43b85026c17
|
|
BLAKE2b-256 checksum How to use checksums |
25c652c4f627cfb8b8a37b1d4f0396978b9e8a7669a6817855406064f485cac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for zyppcli 0.5.0
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.