Unified credentials framework — encrypted config, OS keystore, Vaultwarden integration
Project description
Locke — Python
Unified credentials framework — encrypted config, OS keystore, Vaultwarden integration.
Install
pip install -e ".[dev]"
Usage
Library
import locke
# Load and decrypt config → flat env vars
env = locke.load_config(".locke/config.encrypted.json")
# env["MONGO_URI"], env["SENTRY_DSN"], etc.
# Resolve a single credential
cred = locke.resolve_credential("LOCKE_ENCRYPTION_KEY")
# Get a vault secret
secret = locke.get_vault_secret("myproject/staging/api_key")
CLI
# Decrypt + flatten → shell exports
eval $(locke env)
# Decrypt to stdout
locke decrypt
# Encrypt plaintext config
locke encrypt
# Manage OS keystore
locke keystore set LOCKE_ENCRYPTION_KEY --prompt
locke keystore get LOCKE_ENCRYPTION_KEY
# Get vault secret
locke vault get myproject/staging/api_key
# Initialize project
locke init --project myproject --tenant staging
Environment Variables
| Variable | Purpose |
|---|---|
LOCKE_ENV |
Override environment detection |
LOCKE_ENCRYPTION_KEY |
Encryption key (if not in keystore) |
LOCKE_USE_BIOMETRIC |
Set false to disable biometric gating |
LOCKE_VAULT_URL |
Vaultwarden server URL |
LOCKE_VAULT_USERNAME |
Vaultwarden username |
Testing
cd python
pip install -e ".[dev]"
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
locke-0.5.1.tar.gz
(81.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
locke-0.5.1-py3-none-any.whl
(50.2 kB
view details)
File details
Details for the file locke-0.5.1.tar.gz.
File metadata
- Download URL: locke-0.5.1.tar.gz
- Upload date:
- Size: 81.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbd3faddbfd1899f45f0595df7cf76b36e8874a8357f470e541d0859ea90c135
|
|
| MD5 |
4b006d19d3d61a1249fffebbe9b45e63
|
|
| BLAKE2b-256 |
6c1d142769c278d08702e5e468eada8297da573aa2b07b099ec342735d82fc0d
|
File details
Details for the file locke-0.5.1-py3-none-any.whl.
File metadata
- Download URL: locke-0.5.1-py3-none-any.whl
- Upload date:
- Size: 50.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a17effeef4812f582a27b5edbbe9478f2205a3706abe591fd346db53b3cbff
|
|
| MD5 |
29354f36936d0b2af0eb8a26e05d1048
|
|
| BLAKE2b-256 |
4883a750e9fe7366f64827a036e0f749bbe811e6077771a9a2cb551a5f7b434d
|