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.1.0.tar.gz (3.2 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.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

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

Hashes for sbox-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2cf2e4455090dd029cd67f954b52ade9faae373bdc96d8e558cbc2177a03a836
MD5 c95f6fc73ce6d9d43ed386053ee6d6b4
BLAKE2b-256 21b3662c6d762a525a71d079d9bfbb8114f579461e24794aa5591cef0abe911d

See more details on using hashes here.

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

Hashes for sbox-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b421e831a292535bcee18f0ebd27b4fd0ea460dd6ffe23c8f60530b306563a9b
MD5 e9aed47f7c6c7a70152bc47f1a381e92
BLAKE2b-256 163a8e4c8752319e6006e69729c4ee5b331042b86e915bc2e58fe4ea00f28b2d

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