Created
April 7, 2018 15:32
-
-
Save d3banjan/9142da5c542228a7e3a05c4cebb2308a to your computer and use it in GitHub Desktop.
medium-dscookiecutter-example snip01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dotenv import find_dotenv,load_dotenv | |
print(find_dotenv()) | |
#>/home/debanjan/git-projects/medium-dscookiecutter-example/src/.env | |
print(load_dotenv(find_dotenv())) | |
#>True | |
keys = "CONFIG_PATH DOMAIN EMAIL".split() | |
for key in keys: | |
print(key,os.getenv(key)) | |
#>CONFIG_PATH /home/debanjan/.config/foo | |
#>DOMAIN example.org | |
#>EMAIL admin@example.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment