Skip to main content

import .env file environment variables into python

Project description

Installation

$ [sudo] pip install import-env-file

Examples

.env

DB_NAME="name"
...

settings.py

import import_env_file
import os

DATABASES = {
    'default': {
        'NAME': os.getenv('DB_NAME'),
    }
}

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

import-env-file-2020.12.3.tar.gz (1.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page