Skip to main content

turkeyutils is a set of python bindings for keyutils (available from http://people.redhat.com/~dhowells/keyutils), a key management suite that leverages the infrastructure provided by the Linux kernel for safely storing and retrieving sensitive infromation in your programs.

Usage

The C extension module follows closely the C API (see add_key(2), request_key(2), keyctl_read_alloc(2)).

Exceptions also follow the C API. The only notable difference is for request_key: when the key is not present, None is returned, instead of raising an exception (which is usually a more expensive operation).

Note that the function parameters are passed as bytes not strings! On python 3 this usually requires an explicit param.encode() call.

For example:

import keyutils

# NOTE: only pass `bytes` to the keyutils API:
name = b'foo'
value = b'bar'
ring = keyutils.KEY_SPEC_PROCESS_KEYRING

key_id = keyutils.add_key(name, value, ring)

assert keyutils.request_key(name, ring) == key_id
assert keyutils.read_key(key_id) == value

# set timeout to 5 seconds, wait and then... it's gone:
keyutils.set_timeout(key_id, 5)
from time import sleep
sleep(6)
assert keyutils.request_key(name, ring) == None

Further examples can be found in the test subfolder.

History

This project was part of the Conary/rpath project at SAS that is no longer supported or maintained. This project is a fork maintained by me!

Metadata

Release files for turkeyutils 0.6.1

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

Source distribution (sdist)

Source distribution for turkeyutils 0.6.1
File Size Uploaded Provenance Actions
turkeyutils-0.6.1.tar.gz 70.5 kB Without provenance Details for turkeyutils-0.6.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for turkeyutils 0.6.1
File Actions
turkeyutils-0.6.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for turkeyutils-0.6.1-cp311-cp311-manylinux_2_28_x86_64.whl
turkeyutils-0.6.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for turkeyutils-0.6.1-cp310-cp310-manylinux_2_28_x86_64.whl
turkeyutils-0.6.1-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details for turkeyutils-0.6.1-cp39-cp39-manylinux_2_28_x86_64.whl
turkeyutils-0.6.1-cp38-cp38-manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64 Details for turkeyutils-0.6.1-cp38-cp38-manylinux_2_28_x86_64.whl

Total release size: 1.1 MB

Release files / turkeyutils-0.6.1.tar.gz

Download URL turkeyutils-0.6.1.tar.gz
Size 70.5 kB
Tags Source
SHA-256 checksum
How to use checksums
473fad9eb2412d5c5863192006cb32823f98a52d96921b30162ebae76853030b
BLAKE2b-256 checksum
How to use checksums
082805e5c8d003107e5d1f701b0805970b9355b97eb15cbda443a6ae3a2157dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.12

Release files / turkeyutils-0.6.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL turkeyutils-0.6.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 269.2 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
07d36e08f396a443774a08a60957219ba6b6bdb2e4c56055ee727bd636c1201d
BLAKE2b-256 checksum
How to use checksums
c0e99b155a9bc38ddf4812cc5c484cae010a6b27be49c5763936d5b666520954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.12

Release files / turkeyutils-0.6.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL turkeyutils-0.6.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 238.1 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4393bb89825139f3c10313b10416bef31cf044a42807c0bc4f0738e544958e66
BLAKE2b-256 checksum
How to use checksums
7e861206d44a1dd36004f8405297c39537cbd6ba22fec07c67b85589e18ace62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.12

Release files / turkeyutils-0.6.1-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL turkeyutils-0.6.1-cp39-cp39-manylinux_2_28_x86_64.whl
Size 237.9 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6efd7f195cb3b0e00e8db13eca94d6cd6493713a5d95b9fc8b63a3b95e05a2a4
BLAKE2b-256 checksum
How to use checksums
357818b8ab8b59e3b464927da514a4fd4335ada4797dc4413785406152975487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.12

Release files / turkeyutils-0.6.1-cp38-cp38-manylinux_2_28_x86_64.whl

Download URL turkeyutils-0.6.1-cp38-cp38-manylinux_2_28_x86_64.whl
Size 236.2 kB
Tags CPython 3.8 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
74cbf7327d397972f5336ffe498bf468709261aad3122062a1d0d03e0b5749bb
BLAKE2b-256 checksum
How to use checksums
836231b9a55522daf78cd8ddca27f2ab077e142cd7621d2005159e519274ecfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.12

Security for turkeyutils 0.6.1

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.

Release history Release notifications | RSS feed

This release

0.6.1 This release

5 release files No provenance

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