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.0-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.0-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.0-cp313-cp313-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hexlock-0.1.0-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.0-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.0-cp312-cp312-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hexlock-0.1.0-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.0-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.0-cp311-cp311-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hexlock-0.1.0-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.0-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.0-cp310-cp310-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

hexlock-0.1.0-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.0-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.0-cp39-cp39-macosx_11_0_arm64.whl (184.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7afa34adedcc01f2ea0e09023fbaa21de0fbde1823b3a423a9fe1ff3278980a
MD5 eb20c1888409503126fd2c2160fae514
BLAKE2b-256 87c3393040945f8d3795efbf72fefbfe6eae7fa8560f2d6c6c952de04074510c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a9752df5fdeed6c2a117968cac83b2d45de1956e958e1e515dfc162e8c40aa4d
MD5 ea4385c874a154d1f0407d966959496e
BLAKE2b-256 27fcf8232208c0e076dcdb83f327cee072fa167cda2a3d5d46a59b92868d1d09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8263091cb004e28448cc773074c82b173041557c679806ccc5c2355d966c47a0
MD5 a1df3c28ac72843f606c6c410b1d05e4
BLAKE2b-256 a772ba0228a19cb5863e0f7975166e339e9bef305fb660ac3c6e468a58a946ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd704c5202ca5a9b745b9a76263e368a229117caa641df28ec40e1e57d82b7f6
MD5 090686020f02d5acac7d48fe2440f02e
BLAKE2b-256 59157a89afb61cb0d8b094325b375b54e007fd93a12bd43866ea50a0e7a6a7ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5733c0a0148277dfc3ea24a5a0d48b5590a998b34516f6ef9d6798e75cdfef1c
MD5 8c14b5b9d2da4ce24d43b59826ec022a
BLAKE2b-256 eb4c36dfb6f03145662e3307e7f2890ac2243d70c5fda91369f2a6b2444be958

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8b2bb88a559f6ca49cd7850f722c3bd3b475161e450fbdfc96832115629e6665
MD5 714b1495c0209172223441ce3b4fb2a6
BLAKE2b-256 dedc727e3bc40ec989af9d74ef1b66f13f875a9737b00386f5b27d091fa07e88

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32f34c491db1d135e23c8bd6ee6e1005026c23f7880159d8da544d76c50f221d
MD5 be7ce40a8906a77bc2f00a2d38c4f75a
BLAKE2b-256 b9c48e415a436f8c20efa17f90ff8763b70e23e606034b0bf4bee452fe9b6043

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 994ac3245674ccc406f91a4d168c4f06d0dcb155946bb4c55aea6ce0a8d05a5f
MD5 61d848a74f1fd5ce366d4fe02e14a6d7
BLAKE2b-256 d48ce70a759c3d1b00d99021d64f6b1ad64204a4956f318037ddbd4952d46088

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d4581899d3968458f2ecaa399b2d0a4b92fa904d1ef98a65b3cd61353d2740b
MD5 813ba89747b41b425be4a78f60c744b0
BLAKE2b-256 cad2535e201d6385c919b3f55d49bd75060eceec613085d5f9ceb24770643744

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c1265d79dc6de6bdb6a81b1c8c7d0a32ace40424faf298944bbfde85a208e52
MD5 72c151370fa01083b128f7fd51f473c2
BLAKE2b-256 69ebdbba363fb81c47465246bc8967292b3e504c36cc1cbbd2838e88fcde57e9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 83bc148c465e320d38876ccfab54a1bcd60271c6d8ed47f2954c73fc2924e6a8
MD5 270953a44e94c29086711bf856a4a14e
BLAKE2b-256 c433839021952bf1e2a33b3a650edb195bdad1f0591134c7a1b77703f4b82bc0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27b732e7ae0e1a8303b6c7171fa336a0f85d91b1d0bf93bcfcb22cd14c266877
MD5 806417465ac5a392063049018fabeb34
BLAKE2b-256 f1c32d07a5685af129eca935265a8996e7c5035f3d4ef532322e99fd375cfc79

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e9c46669681ecc74977d2027e654e011683e06608ceb3b489d61b32398c4c48
MD5 c1ec4e8f81af1495a1b1acdad62a8f8f
BLAKE2b-256 cba2e28db79df2d543f8b217a02bfa0014b14b45bce53c88dc583509b91962de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4bc943037ec80313fd05f04dead9d8de93a7277de11f83a2891c488eb86f1ac4
MD5 2a1b469fa006684bc60c9ba6051a58c0
BLAKE2b-256 fddf68fe37f1234e3e1cb25e4e621979af6f61b68cc9ad73103c82a0d97f2858

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hexlock-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 923352ef6705b76f1845a7869c554ec308c7e30b80879888301a92432612d198
MD5 79b9e6e872afd9bdb00a259e12446585
BLAKE2b-256 81cb366bf97c585967653c14813b23da26e2eb8a1b0b54d33026b1bc78970746

See more details on using hashes here.

Provenance

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

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