Skip to main content

Format-preserving PII anonymization for LLM pipelines

Project description

hexlock

Protection for PII and sensitive data in LLM pipelines.

hexlock.xyz

What is it?

Hexlock is a tool for preventing sensitive data from being used with LLMs. It replaces sensitive data but preserves the format so the LLM understands it still. Then it rehydrates the response with the original data. The sensitive data never gets sent to the LLM.

Data types protected include email, phone, SSNs, driver's license identifiers, passport IDs, credit card, GitHub tokens, Anthropic tokens, AWS keys, and more. See CONFIG for more types.

Install

pip install hexlock

Usage

import hexlock

# ephemeral — no key needed, deanonymize in the same session
client = hexlock.Client()
anonymized = client.anonymize(
    "You can each me at jane.smith@acme.com or 415-555-0192."
)
original = client.deanonymize(llm_response)

# persistent — save and restore across sessions
key = hexlock.generate_key()  # store this securely
client = hexlock.Client(key=key)
anonymized = client.anonymize(
    "My credit card number is 4111 1111 1111 1111"
)
blob = client.save_session()  # store this alongside your key

# later, in a new process
client = hexlock.Client(key=key, session=blob)
original = client.deanonymize(llm_response)

Configuration

see CONFIG

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

hexlock-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

hexlock-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (210.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

hexlock-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (186.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hexlock-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl (179.3 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

hexlock-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hexlock-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (210.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

hexlock-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (186.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hexlock-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl (179.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

hexlock-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hexlock-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (210.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

hexlock-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (186.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hexlock-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl (179.3 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

hexlock-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

hexlock-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (210.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

hexlock-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (186.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

hexlock-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl (179.3 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

hexlock-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

hexlock-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (210.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

hexlock-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (186.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

hexlock-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl (179.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file hexlock-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 386a7f89c2b9677a353a72395513899f452ccc4fc7b5403d10f4efde3dc47ede
MD5 678776d313d20ddb747678ccdbea9a01
BLAKE2b-256 d1b56d1eaf516d74ac72b2311a744b64833da7647b90269098974a95792c6872

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1a4c4325d0e15f07c25f05d74539daecc16260711d9d05df2ded2f3cea553449
MD5 b459561933dcee6ee69c7d3d92e5e0c3
BLAKE2b-256 e18ca26969e19913d96e29801c9dfd3321bc0b5ca0be4f7add1906a242be54f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11d3ec118a485db44ec505d4919e69132f1386fb3e62e331ee1e3e89fcfe9bb5
MD5 49a6a3016192fbefe7b9e3db9eda2bea
BLAKE2b-256 d15c7adb624e0052f77559e775c2b6ecef426faeca4f1c2fa028582617e7c3b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 022bf0fcbdbfe7496c9a999e0cd84cd6d544de32f2941c5bd35fd1bdbf77e5e8
MD5 6e9c597446e08b9e2d175680c0868672
BLAKE2b-256 13b260154a91812ecac6ac6e3f81fc9fbe3e8462899fd0dfb305c9e870415ead

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 284fe5679781809bf3c75c9a6da15f1e367fcdb2f96991191d1758923359ea90
MD5 3a3834508f35f1b51437021fef1ab36c
BLAKE2b-256 21b8c5ca1f01cb994560d857f78a2eb4d7f6638d0c87fba41abe5521bc6218a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f9537f2f257fc178ffa7cbcfaa7511870ee8844abd61bbdae8529919a0d24ec5
MD5 64a2e00de28cdc4b3a91f4bd80f7d298
BLAKE2b-256 a870255cee113411126528b7f2b7199d7e89724c6c82d09ac30a8ebf6c66f8a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26d4904b39e88e22e5cdb050484076254e99d53d140ca13644a3d064371ab67a
MD5 3c590963a3f40e0d681bb4cf30977362
BLAKE2b-256 e32481930b8ee23f4a18b33a7283e38cd2913d92699ed79af059535ce04b8d6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 73e487cdc38a13d93b7a71e703c9b15476ae15967444d38d43f35eb8564a9107
MD5 1aee62c13c1044304a9f8927dd7ff36f
BLAKE2b-256 4d20169e19472f9e26de0790e681b9e6aa7186374b31f78e8e2611386b332b48

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c3466bd4ce12d45263d0a56271bb20118c5cf1f1727feef1ccf851b9cf1ba55
MD5 5d19b84d6074f13481551636873ff4fb
BLAKE2b-256 2c3141f800f3302213f85934b18da204a9ed571df37bc2867a04ae64760ebad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 994f8506e912155e7cbd7b3d93b4a471eb2d520e63c16c063abf4226786c5609
MD5 334783f11211b16fbda0ea8efbf15830
BLAKE2b-256 1c50ac25ed9c879bf622b95299358511e10a51fdf99267ca4fcb2bd8aa815abd

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6b9460bf56a5f7cb1759ae4cecf3b1d782818c9dc188938a2571fe91bd2f92a
MD5 23289782f259cc77d5d7f3c405fa25c7
BLAKE2b-256 0badffd9f1fe687aafbf1e78e195a076cc1d63133121bdad3723895a0985cde9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d63370bf1ca126d5e12870bdf485e931c96127c67ae2dff17fa4522684a92bd8
MD5 b87a507e12aa5b93312927edff1f457c
BLAKE2b-256 f48b43615c31b41a0516cdb378f4425d66e4581ba39961ddfb98428c75c5067a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8de3ba34d6a96d0149620976b696d4ee0cdbb58b78cb54f5b5dd919ce9f5a5d3
MD5 839515b82ed85dd6897a1622e36312e4
BLAKE2b-256 5dde96051b6f41d3ad656ceee074ab793a2005be66ec3e43773a07609442a199

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 efdd4456e2e035af86c1c19232e051aba6c5e569c1fac29210bf2133b4c05682
MD5 8a728539cdd4d885d7b9509334f4a49c
BLAKE2b-256 cf69e5a924c1668311a6218945ca60138780d8694a50c83fd7ba84f4ae807572

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e518fe6098ae3ff9bfb5d0a216dac135091abc24b74a187b1ea924a51020e41e
MD5 74905bcaa28ad3c665a967148e0820ce
BLAKE2b-256 903a5072742fb31c211cb35c878482d5309b6fc92767489d2ed207a48b592aea

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 38304108609561f41ab2ec6578e3e27f7af28204c45cdae54413e94c32dbecbf
MD5 e211dd2797842632ea2d7e244d7207e2
BLAKE2b-256 63231b335f30f7e4f8a98adefff52d2b576a6af538045fd1553c43b3bdc04bcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1670454334eac91477dd1d3ab77f92ba05b7754bb6cc27cc372256fe29e23e8d
MD5 ded801bc404c26744a783662666384b4
BLAKE2b-256 4f10952168cf462150f63aa27c92da04275ccfc239e7e4fe3d992b16ed171070

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b45c773df6dcee2f0bc92a1c9198857da9857000773bce925aed85dc8aafefc4
MD5 583043aff305c5625f87f4fadfda3e71
BLAKE2b-256 fc919163a18381cf4e4d3241c7e3e79e9485f09e3fbc26b4e2b900a6d3b53819

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b154687d36e857eb977d8d2cada7371f92ba44882debdf43f99430df65904f15
MD5 068ff83d30913e0ec60d6edaff787659
BLAKE2b-256 195e8afee7a63f3fcf72a4c9cea421bcbf057248e9b0d4f2736db5fc24fd75aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hexlock-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2960739d85ab122a1160b92a3fdc897a0c1ccdabd5d5824a5141ac13ddc9b5c7
MD5 cbe73c9896649d02eb92b2df1d375cfb
BLAKE2b-256 313f932d5547cc0ba3b76c1bd26f6104bf2c921fbe725c541a5814a8243c6a71

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on ttarvis/hexlock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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