.env file handler. required for django, docker, etc
Project description
Install
$ [sudo] pip install env-file
Classes
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
DJANGO_SETTINGS_MODULE = project.settings
DJANGO_SECRETKEY = somerandomkey
DB_NAME=dbname
DB_PASS=secret
manage.py
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)
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
env-file-2019.2.22.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for env_file-2019.2.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 651368e45b96b685bfad645797b3bec67fd74497243ed97ebb970f818a1a2ebf |
|
MD5 | e06e6c1a7d27b14f26fbba6ad35153d3 |
|
BLAKE2b-256 | 9d33dbce3c038619d6510bfb69999a0d84ff9b44ed14008af85b733fcc54c9e6 |