.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.25.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for env_file-2019.2.25-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b05e0ab82e7d13c4a0483ea972f44fc5a86d9dce01a86aa8128e308a821bc6e8 |
|
MD5 | 5b18203fd354a02a8fb4964d79641d01 |
|
BLAKE2b-256 | fd66465f7cb44d5c6531c72ca3a287f6b3ceadff680ebea75d35b449bd73f168 |