--- id: python-dotenv version: "1.2.2" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # python-dotenv — Read key-value pairs from a .env file and set them as environment variables License: permissive · Maintenance: active · Popularity: top 100 on PyPI ## Install pip install python-dotenv uv add python-dotenv poetry add python-dotenv ## Description # 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](https://12factor.net/) principles. - [Getting Started](#getting-started) - [Other Use Cases](#other-use-cases) - [Load configuration without altering the environment](#load-configuration-without-altering-the-environment) - [Parse configuration as a stream](#parse-configuration-as-a-stream) - [Load .env files in IPython](#load-env-files-in-ipython) - [Command-line Interface](#command-line-interface) - [File format](#file-format) - [Multiline values](#multiline-values) - [Variable expansion](#variable-expansion) - [Related Projects](#related-projects) - [Acknowledgements](#acknowledgements) ## Getting Started ```shell pip install python-dotenv ``` 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... [View on SkillFed](https://skillfed.io/packages/python-dotenv) · [View on PyPI](https://pypi.org/project/python-dotenv/)