Skip to main content

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, sbox automatically updates your JSON vault.
  • Interactive Mode: Missing secrets? sbox will ask for them in the CLI.
  • Environment Support: Easily override secrets using Environment Variables.
  • Security: Automatically sets file permissions to 600 on Linux systems.

Installation

pip install sbox

How to use

  1. Create SBox object:
from sbox import SBox

box = SBox()
  1. Create Pydantic model:
from sbox import SBox

from pydantic import BaseModel

box = SBox()

class MyModel(BaseModel):
    smth: str
  1. 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()
  1. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sbox-1.0.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

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

Hashes for sbox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 81b779f7014795579ad73e5e0f06c7e547822ee9558257c1911e1e6ed1921c42
MD5 32f774ce71b6bdd51ce4cdc5ad161a0e
BLAKE2b-256 538168c68b163be2cf4524b4b69e68f7a70f7a6c776c498cb23b387ddcede587

See more details on using hashes here.

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

Hashes for sbox-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 617080f1671eaa4082a164e207c6531c68d11ebfd2f7f5a43c5ba4a33216252b
MD5 13e264445c780c0e9165793c4dd32267
BLAKE2b-256 c7dbab039ed88d7b299963a172a89b1a2cbb494ae23247aaa7e87b07c848dc7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page