Skip to content

Instantly share code, notes, and snippets.

@jattoabdul
Created July 10, 2018 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jattoabdul/cad53998c05e459edfa219d17c33fb2f to your computer and use it in GitHub Desktop.
Save jattoabdul/cad53998c05e459edfa219d17c33fb2f to your computer and use it in GitHub Desktop.
Configuration __init__.py file.
from os import path, environ
from dotenv import load_dotenv
env_path = path.join(path.dirname(__file__), path.pardir, '.env')
load_dotenv(env_path, override=True)
def get_env(key):
return environ.get(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment