> For the complete documentation index, see [llms.txt](https://docs.datahungry.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datahungry.dev/library/dotenv.md).

# dotenv

This package used to load environment from .env file

## Install Package

```bash
pip install python-dotenv
```

## Codes

{% code title=".env" %}

```
DB_URL=sqlite///mydb.db
```

{% endcode %}

{% code title="app.py" lineNumbers="true" %}

```python
from dotenv import load_dotenv
load_dotenv(override=True)

DATABASE_URL = os.getenv("DB_URL")
```

{% endcode %}
