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.1.0.tar.gz
(3.2 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.1.0-py3-none-any.whl
(3.2 kB
view details)
File details
Details for the file sbox-1.1.0.tar.gz.
File metadata
- Download URL: sbox-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cf2e4455090dd029cd67f954b52ade9faae373bdc96d8e558cbc2177a03a836
|
|
| MD5 |
c95f6fc73ce6d9d43ed386053ee6d6b4
|
|
| BLAKE2b-256 |
21b3662c6d762a525a71d079d9bfbb8114f579461e24794aa5591cef0abe911d
|
File details
Details for the file sbox-1.1.0-py3-none-any.whl.
File metadata
- Download URL: sbox-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 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 |
b421e831a292535bcee18f0ebd27b4fd0ea460dd6ffe23c8f60530b306563a9b
|
|
| MD5 |
e9aed47f7c6c7a70152bc47f1a381e92
|
|
| BLAKE2b-256 |
163a8e4c8752319e6006e69729c4ee5b331042b86e915bc2e58fe4ea00f28b2d
|