django-environ
Django-environ allows you to utilize 12factor inspired environment
...To do that and to use the 12factor approach, some connection strings are expressed as url, so this package can parse it and return a urllib.parse.ParseResult. These strings from os.environ are loaded from a .env file and filled in os.environ with setdefault method, to avoid overwriting the real environment. A similar approach is used in Two Scoops of Django book and explained in the 12factor-Django article. django-environ is the Python package that allows you to use the Twelve-factor methodology to configure your Django application with environment variables.For that, it gives you an easy way to configure Django application using environment variables obtained from an environment file and provided by the OS.