A simple secret manager with Pydantic model migration support
Project description
sbox
A simple secret manager with Pydantic model migration support
Key Features
- Auto-Migration: If you add or remove fields in your Pydantic model,
sboxautomatically updates your JSON vault. - Interactive Mode: Missing secrets?
sboxwill ask for them in the CLI. - Environment Support: Easily override secrets using Environment Variables.
- Security: Automatically sets file permissions to
600on Linux systems.
Installation
pip install sbox
How to use
- Create
SBoxobject:
from sbox import SBox
box = SBox()
- Create Pydantic model:
from sbox import SBox
from pydantic import BaseModel
box = SBox()
class MyModel(BaseModel):
smth: str
- Parse it and save to file
from sbox import SBox
from pydantic import BaseModel
box = SBox()
class MyModel(BaseModel):
smth: str
box.parse(MyModel)
box.saveall()
- Get the fields
from sbox import SBox
from pydantic import BaseModel
box = SBox()
class MyModel(BaseModel):
smth: str
box.parse(MyModel)
box.saveall()
mymodel = box.get_model(MyModel) # Or just box.MyModel
print(f'smth: {mymodel.smth}')
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
sbox-1.0.0.tar.gz
(3.1 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
sbox-1.0.0-py3-none-any.whl
(3.1 kB
view details)
File details
Details for the file sbox-1.0.0.tar.gz.
File metadata
- Download URL: sbox-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81b779f7014795579ad73e5e0f06c7e547822ee9558257c1911e1e6ed1921c42
|
|
| MD5 |
32f774ce71b6bdd51ce4cdc5ad161a0e
|
|
| BLAKE2b-256 |
538168c68b163be2cf4524b4b69e68f7a70f7a6c776c498cb23b387ddcede587
|
File details
Details for the file sbox-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sbox-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617080f1671eaa4082a164e207c6531c68d11ebfd2f7f5a43c5ba4a33216252b
|
|
| MD5 |
13e264445c780c0e9165793c4dd32267
|
|
| BLAKE2b-256 |
c7dbab039ed88d7b299963a172a89b1a2cbb494ae23247aaa7e87b07c848dc7a
|