Skip to main content

A unified TOML-based secret management system for local development environments with lazy loading, alias-based security, and automatic IDE integration.

Project description

Documentation Status https://github.com/MacHu-GWU/home_secret_toml-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/home_secret_toml-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/home-secret-toml.svg https://img.shields.io/pypi/l/home-secret-toml.svg https://img.shields.io/pypi/pyversions/home-secret-toml.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to home_secret_toml Documentation

https://home-secret-toml.readthedocs.io/en/latest/_static/home_secret_toml-logo.png

Modern software development presents an increasingly complex credential management challenge. As cloud services proliferate and microservice architectures become standard, developers face exponential growth in sensitive information requiring secure storage and convenient access—API keys, database credentials, authentication tokens, and service endpoints.

This complexity creates a fundamental tension: developers need immediate access to credentials during development while maintaining rigorous security standards. Traditional approaches, from hardcoded secrets to scattered environment variables, fail to address the sophisticated demands of contemporary multi-platform, multi-account development workflows.

The consequences of inadequate credential management extend beyond inconvenience. Security breaches, development inefficiencies, and maintenance nightmares plague teams using fragmented approaches. What developers need is a systematic solution that unifies security, accessibility, and scalability into a coherent framework.

HOME Secret TOML emerges as a response to these challenges—a comprehensive local credential management system built on structured TOML configuration and intelligent Python integration. Unlike nested JSON structures, TOML’s flat key-value format provides immediate context visibility in every line, making secrets easy to navigate and edit. This approach transforms credential management from a necessary evil into a streamlined development asset.

Key Features

  • Flat Key Structure: Every secret is a single line with full path context—no nested brackets to manage

  • Comment Support: Native # comments for documentation directly in the secrets file

  • Zero Dependencies: Uses only Python 3.11+ standard library (tomllib)

  • Dual Usage: Copy single file to your project OR pip install as a package

  • CLI Tool: hst ls to list secrets, hst gen-enum to generate IDE autocomplete code

  • IDE Support: Generated enum classes provide full autocomplete and type checking

Quick Links

Install

home_secret_toml is released on PyPI, so all you need is to:

$ pip install home-secret-toml

To upgrade to latest version:

$ pip install --upgrade home-secret-toml

Quick Start

  1. Create ~/home_secret.toml with your secrets:

# GitHub credentials
github.accounts.personal.account_id = "myuser"
github.accounts.personal.users.dev.secrets.api_token.value = "ghp_xxxxxxxxxxxx"

# AWS credentials
aws.accounts.prod.secrets.deploy.creds = { access_key = "AKIA...", secret_key = "xxxx" }
  1. Access secrets in Python:

from home_secret_toml import hs

# Direct value access
api_key = hs.v("github.accounts.personal.users.dev.secrets.api_token.value")

# Token-based (lazy) access
token = hs.t("github.accounts.personal.users.dev.secrets.api_token.value")
api_key = token.v  # Resolved when accessed
  1. Use CLI to explore and generate code:

# List all secrets (values are masked)
$ hst ls
github.accounts.personal.account_id = "***"
github.accounts.personal.users.dev.secrets.api_token.value = "gh***xx"

# Filter secrets
$ hst ls --query "github personal"

# Generate enum file for IDE autocomplete
$ hst gen-enum

Single-File Usage (No pip install)

For projects where you want zero dependencies, simply copy home_secret_toml.py to your project:

# Copy the file and import directly
from home_secret_toml import hs

api_key = hs.v("github.accounts.personal.users.dev.secrets.api_token.value")

Requirements: Python 3.11+ (for built-in tomllib module)

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

home_secret_toml-0.1.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

home_secret_toml-0.1.2-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file home_secret_toml-0.1.2.tar.gz.

File metadata

  • Download URL: home_secret_toml-0.1.2.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for home_secret_toml-0.1.2.tar.gz
Algorithm Hash digest
SHA256 86484bd44d24ff6ec2bbc0af421403bc9c41a5a899b76ea03cc39ebed6c17fbf
MD5 7da5e01b03ec0cf049531fb9e0389a47
BLAKE2b-256 a5feece4dcaadd1f61e702e9c2fa83e75245c712da8c39a75dfe2766a3b13de9

See more details on using hashes here.

File details

Details for the file home_secret_toml-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for home_secret_toml-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f75e249487658352009a3eb4bccbdf96d40908d26a97b1b68b3aedd92ee6ce69
MD5 722440871c1a33234f66227fcc6fb9e9
BLAKE2b-256 1cb5d82bd179a5935727b3b8d8445c8edd6f9cadf342883143557de824110162

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