<!--
https://pypi.org/project/readme-generator/
https://pypi.org/project/python-readme-generator/
-->

[![](https://img.shields.io/pypi/pyversions/env-file.svg?longCache=True)](https://pypi.org/project/env-file/)

#### Installation
```bash
$ [sudo] pip install env-file
```

#### Classes
class|`__doc__`
-|-
`env_file.EnvFile` |.env file class

#### Functions
function|`__doc__`
-|-
`env_file.get(path='.env')` |return a dictionary wit .env file variables
`env_file.load(path='.env')` |set environment variables from .env file

#### Examples
##### Django example

`.env`
```bash
DJANGO_SETTINGS_MODULE = project.settings
DJANGO_SECRETKEY = somerandomkey
DB_NAME=dbname
DB_PASS=secret
```

`manage.py`
```python
import env_file
import sys

if __name__ == "__main__":
    #  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
    env_file.load()

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
```

<p align="center">
    <a href="https://pypi.org/project/python-readme-generator/">python-readme-generator</a>
</p>