Skip to main content

Format-preserving PII anonymization for LLM pipelines

Project description

hexlock

Protection for PII 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.

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.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

hexlock-0.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

hexlock-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hexlock-0.1.1-cp313-cp313-macosx_10_13_x86_64.whl (177.6 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

hexlock-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hexlock-0.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

hexlock-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hexlock-0.1.1-cp312-cp312-macosx_10_13_x86_64.whl (177.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

hexlock-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hexlock-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

hexlock-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hexlock-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl (177.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

hexlock-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

hexlock-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

hexlock-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

hexlock-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl (177.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

hexlock-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

hexlock-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

hexlock-0.1.1-cp39-cp39-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

hexlock-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl (177.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for hexlock-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9dab573b4122540b9f3a47b7576c68e771dfc2f6786beeb61aac23c24cdc8aab
MD5 d27eca2254504421f1e5cc6d3553b640
BLAKE2b-256 081d56c1fae1ca7a4b5de36391425c1789ce17eebb64356a1b14ca5c130ba45e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2159bad68fafd4f319a0d9bdb724a94135f52785df995341516d61e0ee2a033b
MD5 2b2c2fd95e4ab70fdfb63a0cafa4da39
BLAKE2b-256 422c2dcc876db45a3d6a0d89f74dd6ea9c4500893d0b1868001c114e4a57d3f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d022a75e80036b47f7344564cb9631bc237f7156063410adc8954f3f70c85028
MD5 52d09f306f627b6be332621dbe0c4a6f
BLAKE2b-256 5193688b90e4bc83f61272d149651a847cbb21345fc74f59275a2c335d827721

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 56eaaa810f622b2e007a9d793fd4c640bc41a275a55f6179b4aa6bd47cea579a
MD5 4582e2cd1c194c0c6428ce0e49f26a6d
BLAKE2b-256 ca60f1fa0c839133c361ee54b19c6d013dca4d1d04950fa0c3b214806a1169e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7fdc1a49a4a8081da0c9fc6076d8ce9f0b3a0b836378b605e241f617429f4fcd
MD5 3929411f0d795023d1bf2b5e25b3a6f2
BLAKE2b-256 32ef5ca485eddcddf639415cf880adf5b91b90248e30f8e2dbd4ffc3aab52a53

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5ebd5afb1287a868c834ca747c71c48c03afa85a9cb9dd7c5fda6ac607ac3bab
MD5 605997caa80c962cf0baf6d017ba9bee
BLAKE2b-256 75d8278b2c033c3ba4666b51c9d728c2378326f3537d417c7d63bc5a09a53f03

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c59d3c31171e7f181cb095aeb874fc8fd43df0c77add01cd452d09182dfe8ab6
MD5 c17585444116c5253a7c7e802e856a87
BLAKE2b-256 1e094592ae0f19f83340c73cfead5b2ea2eff06d6ff83f656c8b19017bda4e89

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9087d2de25999adb4a7bf4edb22fda168d8ffa15c14af5f64d876cb53034b503
MD5 5f0e5cb9964ec4f1f8fc2d131a9f7556
BLAKE2b-256 1242c03fe86c179358ff70641120d00178d82eedbf1510ffc3568cd53ff3aaf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37e7a0941b384d18cf59f98162879a26aa70c41a71b37c6d26c7b704d0b8aa70
MD5 8d9988d1d420bd4ae4141e80ed03bfb3
BLAKE2b-256 cf902d87c6c54e621d2bf8d9e63d8d998b2f5be886fb7f33ba609e49c174f763

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4686effe133fcd9b6af65da6640f827f268ef5ffbd893f8572ef17aff39bf2fe
MD5 3a0f2545e9f6b9c924c5de33f10b59aa
BLAKE2b-256 5896a7e6f1cf58d8882ffc807c83b750296cd37c6b3633985dec49412dc3f417

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ccdb572bed45a7240bfb13759fe92f811ecb79feb37ef81434dc4d59cea04fc
MD5 f6968fb064bd5010a14595f036649429
BLAKE2b-256 92e00eb980de746c3c6434ada256249563eb370ea24b4f362afe41ccd4d9ef6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d5e1a26873ff1f3fd617085cead649005f4ed7b54dee5311ada78f7d13dfee73
MD5 950c1d632aed139e781b2912e9a94592
BLAKE2b-256 afe0879536540d88f84f4de25bf6a577d3a91648a3fdd488d85ca5a5980d692d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b512dea90d0143e7fe214dbfadf32e2a8f9c9ed7271c4526a29d0260a8d911f
MD5 ce9e8a00bee65c828135ea2ea8804f08
BLAKE2b-256 32d402560d40cdbeb04ffc9b4e211009bc15e0bd063e7ab56dee5a1f006d457a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ddfdb0dd64192be852c55596f839ed8df5ea35c6fa9748b119da954a09dade8d
MD5 24f675add233affe75bc45baca4e92e6
BLAKE2b-256 7763276c8412d9cc4d05941613ab0d0778217c926859f242b7cc504165b23dc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80c9979d90fcc4b792d3f0bef75a6840ba63926140ffabe63f418865941e8bc4
MD5 d7235f1a9cdec26d7e6d3bcf2304293c
BLAKE2b-256 ac62fc65beb66e85f1ca704e917eff9cc0791ae6ebbdac86e9bd4a3fa378be87

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1cea4a7bfcb29ed6cb57d11cb78c44f752064d3b0978eac89bedf00a898cff25
MD5 c91f72cf047e776d160733e0c862af1d
BLAKE2b-256 d271d8a99c647e69f75ba50a7b36ee66219566a777ecb6ffb039547a49b634be

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff5936cad1f47fd7ba5bbaef842c73cca5b6806735e2535c6077ba0160ef585e
MD5 b944c874e5d58094ac625cea5d8f0922
BLAKE2b-256 2108ea0742c1d6f9f002ec958620b844e103f3b10362369664b264e258e5be36

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd50499b01449952439b0f069c12d25b605391ce736ea2468b57e460ba02cf60
MD5 dbc17a9123ec8c30d9d188d94f51d04c
BLAKE2b-256 604fe8278a10bdccd07c268ecbad3d38bf5ff61d4fe01e44225b7c1f24efbd5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4cf188e23e433c51fadd0c94e934580e653651b852f5047448184f1000925bd
MD5 b96de037279f3b42f01df2577c7fecd9
BLAKE2b-256 95b940aac11d42f5a0a57998d72f7281303ff726edb3487e2abb75ea2114120a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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.1.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hexlock-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f05ba3b40bef4390d23e48c66ffaed4785bc48b028266c12f700ebeda8481ea
MD5 190598438b159fb310fca524c8dd0319
BLAKE2b-256 5bee65d8a5342bbdb26275a38767407dc1b3d59dd596d4a566365e91ea0f8bc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hexlock-0.1.1-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