Stack Explorer

python-dotenv

Utility

Library to load environment variables from .env files

20M/week → Stable

Features

environmentconfigurationenv-varstwelve-factorsettings

Pros and Cons

Ventajas

  • + Extremely simple to use
  • + Industry standard pattern
  • + Keeps secrets out of code
  • + Compatible with Docker and CI/CD
  • + No external dependencies
  • + Follows 12-factor app principles

Desventajas

  • - Very basic functionality
  • - No type validation
  • - No complex configuration support
  • - No secrets encryption
  • - .env files can be forgotten

Use Cases

  • Local development configuration
  • Development secrets management
  • Per-environment variables
  • API keys configuration
  • Database connection setup
  • CI/CD pipelines

Tecnologías Relacionadas