A simple package to read credentials generated by systemd's LoadCredential, with a fallback on environment variables.
Project description
loadcredential
This is a simple python package for interfacing with systemd's LoadCredential mechanism.
It allows reading secrets from the credentials directory, with a fallback on environment variables if needed.
Usage
Basic usage
from loadcredential import Credentials
credentials = Credentials()
secret1 = credentials["SECRET_1"]
Changes
v1.1 (2024-05-10)
- Added
credentials.get(key, default=None)which returns a default value and does not raise an error when the key is absent - Added
credentials.get_json(key, default = None)which treats the imported secret as json data
v1.0 (2024-05-09)
Initial version
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
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
File details
Details for the file loadcredential-1.3.tar.gz.
File metadata
- Download URL: loadcredential-1.3.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b0061b5dea739177f5cf675fb07546b4689909886291713c78ed9ffabf0f25c
|
|
| MD5 |
3bc4618b234d1bdc1fa00f81045607f8
|
|
| BLAKE2b-256 |
033091b8c259d2f384f7491f9565f1ced3629227daa2230555f4817609faaa99
|
File details
Details for the file loadcredential-1.3-py3-none-any.whl.
File metadata
- Download URL: loadcredential-1.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0980e332db85c93808dade21da18c008b2191f1ac90fe8f04365e9c4c8ddb3c0
|
|
| MD5 |
1886d0529b081806ec86abd5abc8bd40
|
|
| BLAKE2b-256 |
80a5630dde382b5c54b2bac50bf65b20aa98169252726ef5e22f5dfb018ac038
|