Skip to main content

Python SDK for lazy-locker - A secure local secrets manager

Project description

lazy-locker SDK for Python

SDK Python pour lazy-locker - Gestionnaire de secrets sécurisé.

Installation

pip install lazy-locker
# ou
uv add lazy-locker

Prérequis

L'agent lazy-locker doit être démarré :

lazy-locker  # Entrez votre passphrase dans le TUI

L'agent reste actif pendant 8 heures.

Usage

Injection automatique

from lazy_locker import inject_secrets
import os

# Injecte tous les secrets dans os.environ
inject_secrets()

# Utilisez vos secrets normalement
api_key = os.environ["MY_API_KEY"]

Récupération manuelle

from lazy_locker import get_secrets, get_secret

# Tous les secrets
secrets = get_secrets()
print(secrets)  # {"MY_API_KEY": "xxx", "DB_PASSWORD": "yyy"}

# Un secret spécifique
api_key = get_secret("MY_API_KEY")

Vérification de l'agent

from lazy_locker import is_agent_running, status

if is_agent_running():
    info = status()
    print(f"Agent actif, TTL restant: {info['ttl_remaining_secs']}s")
else:
    print("Lancez lazy-locker pour démarrer l'agent")

Comparaison avec python-dotenv

Feature python-dotenv lazy-locker
Secrets en clair sur disque ✅ Oui (.env) ❌ Non (chiffré)
Versioning sécurisé ❌ Non ✅ Oui
Expiration des secrets ❌ Non ✅ Oui
Multi-projet ❌ Non ✅ Oui

Migration depuis python-dotenv

# Avant
from dotenv import load_dotenv
load_dotenv()

# Après
from lazy_locker import inject_secrets
inject_secrets()

# Le reste du code reste identique !

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

lazy_locker-0.0.6.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

lazy_locker-0.0.6-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file lazy_locker-0.0.6.tar.gz.

File metadata

  • Download URL: lazy_locker-0.0.6.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lazy_locker-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a551f1d762224288b10287123e2936b788b90d1601def7dd74e795630e21f6ab
MD5 7a3caff983827bd7798026b20a1d6a47
BLAKE2b-256 420aff3efdb0ea5c6cf621c63b002d857f565245a0891b2e971c7c1d163f2bcb

See more details on using hashes here.

File details

Details for the file lazy_locker-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: lazy_locker-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lazy_locker-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e74b3cdd10efd42b4c8b55ae4942c492c494879167366d6029026d9cba2bdb7
MD5 a3df1fbe4b7a09ece72d9d77a26fda33
BLAKE2b-256 b0600b3dbf4bbf5a993387dafdbba3841b092d2f2545b91b1abbe203492d39e0

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