Skip to content

Instantly share code, notes, and snippets.

View apibakery's full-sized avatar

API Bakery apibakery

View GitHub Profile
@apibakery
apibakery / env.py
Created December 4, 2021 11:19
Environment variable parsing for Django projects using dotenv
# Simple and explicit environment variable parsing for Django projects
# Uses the "dotenv" package to automatically load .env file
# See https://apibakery.com/blog/django-settings-howto/
#
# Written by Senko Rasic <senko@apibakery.com>
# Released into Public Domain
import os
from dotenv import load_dotenv