seyaml
seyaml is a Python YAML loader and CLI tool supporting custom tags:
!env VAR— load environment variable, supports indexing like!env VAR[0]for comma separated values!secret key— load secret from a provided dictionary, supports indexing like!secret api_key[1]for comma separated values!enc ENCRYPTED_VALUE— decrypt AES-256-GCM encrypted base64 string with a provided key
You could you any combination of features, they all optional.
Constraints
- env variables always UPPERCASE strings
- secret values always lowercase strings
- env values always Base64 strings
Installation
pip install seyaml
Usage
Python API
from seyaml.loader import load_seyaml
import base64
secrets = {
"api_key": "key1,key2,key3",
"simple": "value"
}
decryption_key = base64.b64decode("YOUR_BASE64_32_BYTE_KEY")
config = load_seyaml("config.yaml", secrets=secrets, decryption_key=decryption_key)
print(config)
YAML Example
database:
url: !secret simple
token: !secret api_key[2]
user: !env DB_USER
password: !enc gN0jA1u+9aC9X9DkR3ABxF3P5pSXXTFsm/u5yH7sy94gQ==
CLI Usage
Generate a secure AES-256 key (base64 encoded):
seyaml generate-key
Encrypt plaintext:
seyaml encrypt "my secret text" --key YOUR_BASE64_KEY
Decrypt ciphertext:
seyaml decrypt ENCRYPTED_BASE64_STRING --key YOUR_BASE64_KEY
Metadata
Release files for seyaml 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seyaml-0.1.1.tar.gz | 5.4 kB | Without provenance | Details for seyaml-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seyaml-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for seyaml-0.1.1-py3-none-any.whl |
Total release size: 10.5 kB
Release files / seyaml-0.1.1.tar.gz
| Download URL | seyaml-0.1.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3a7f4387266535787aa9bfb1f17f0bd84db9bbed52e6a84701ff98f0e9d9774
|
|
BLAKE2b-256 checksum How to use checksums |
5015dd00d0f4dcecdb1e2745505c86a6828d086ccee07d8aa685f6b9a55b680c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / seyaml-0.1.1-py3-none-any.whl
| Download URL | seyaml-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a158d4c99c7fe375d4b3a88f1d577bc39091b09818b025a29470c4af70e2a63
|
|
BLAKE2b-256 checksum How to use checksums |
9162141a2e9756abe0af7369daf48bcf63ffc5d7bd88e612b1257baaf9aad5d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Security for seyaml 0.1.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.