{"repo":"theskumar/python-dotenv","free":true,"listed":false,"github":"https://github.com/theskumar/python-dotenv","clone":"git clone https://github.com/theskumar/python-dotenv.git","description":"Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles.","language":"Python","stars":8842,"topics":["python","devops-tools","dotenv","12-factor-app","configuration","env","environment-variables"],"license":"BSD-3-Clause","category":"cli-tools","readme_excerpt":"python-dotenv [![Build Status][build status badge]][build status link] [![PyPI version][pypi badge]][pypi link] python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applications following the 12-factor principles. - Getting Started - Other Use Cases - Load configuration without altering the environment - Parse configuration as a stream - Load .env files in IPython - Command-line Interface - File format - Multiline values - Variable expansion - Related Projects - Acknowledgements Getting Started If your application takes its configuration from environment variables, like a 12-factor application, launching it in development is not very practical because you have to set those environment variables yourself. To help you with that, you can add python-dotenv to your application to make it load the configuration from a .env file when it is present (e.g. in development) while remaining configurable via the environment: By default, load dotenv() will: - Look for a .env file in the same directory as the Python script (or higher up the directory tree). - Read each key-value pair and add it to os.environ . - Not override existing environment variables ( override=False ). Pass override=True to override existing variables. To configure the development environment, add a .env in the root directory of your project: The syntax of .env files supported by python-dotenv is similar to that of Bash: If you use variables in v","default_branch":null,"files":null,"tree":[],"storefront":"/r/theskumar","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/theskumar/python-dotenv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}