Skip to main content

Keycache

Keycache is an AES encrypted key:value store for your sensitive credentials. It can be used for database passwords, API-keys, private certificates or anything you don't want floating around on your filesystem. The module works as both static singleton and class instance for multiple simultaneous stores.

pip install git+git://github.com/psytron/keycache.git#egg=keycache

Basic Usage: This example uses automatic defaults for all parameters. It generates an encryption key derived from a hardware identifier, a default path for blobs ( ./blobs/ ), and default name for current blob ( default )

from keycache import Keycache

k1 = Keycache()
k1.add('some_namespace', { 'key1':'val1' , 'key2':'val2'} )
k1.save()

Specific Usage:

k2 = Keycache( 
    alias='api_workers',                        # Blob name
    private_key='key_from_secure_message_bus',  # Encryption key
    blob_path ='blobs/dir' )                   # Where to store encrypted blobs

k2.add('some_namespace' , { 'key1':'val1' , 'key2':'val2'} )
k2.save() 

Loading from file: If you want to distribute the credentials to other machines while keeping a central configuration file on your local host you can use this method. Just ensure you keep your credentials file out of your repository and deploy directory.

k3 = Keycache()
k3.load_config('path/to/config.yml')
k3.save() 

Release files for keycache 0.27.0

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

Source distribution (sdist)

Source distribution for keycache 0.27.0
File Size Uploaded
keycache-0.27.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for keycache 0.27.0
File Interpreter ABI Platform
keycache-0.27.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / keycache-0.27.0.tar.gz

Download URL keycache-0.27.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
be5b5f2eb5ebeaee07bb80918d4e5c32025816bd6497ba95e177efff38560922
BLAKE2b-256 checksum
How to use checksums
0e4e09ff05c9b9f68fd83796db9932f123a743f22a5acccce55b482f1a255a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release files / keycache-0.27.0-py3-none-any.whl

Download URL keycache-0.27.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
029b8fdb2b7157a92a94340baa23e3a563e25a90f0cd702f3c932d8b84eca8ed
BLAKE2b-256 checksum
How to use checksums
5e2ddd18e277369796c5a6518e240d810f94c4b919768e135f810cb71d0283db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.27.0 This release

2 release files

0.26.0

2 release files

0.25.6

2 release files

0.25.5

2 release files

0.23

2 release files

0.22

2 release files

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