Skip to main content

Handle .env files

Project description

Shell Command and Library to write and read .env like files.

.env file are commonly used with Procfile based apps.

Usage

### Shell

Inspect file

`shell $ dotenv FOO: bar Bar: baz `

Get value for key

`shell $ dotenv FOO FOO: bar `

Set value for key

`shell $ dotenv FOO baz FOO: baz `

### As a library

`python >>> from dotenv import DotEnv >>> dotenv = DotEnv('/path/to/.env') >>> print dotenv {"FOO": "bar", "Bar": "baz"} >>> dotenv['FOO'] "bar" >>> dotenv['FOO'] = "baz" >>> dotenv['FOO'] "baz" >>> del dotenv['FOO'] >>> print dotenv {"Bar": "baz"} `

> Every action is persisted.

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

dotenv-0.0.2.tar.gz (6.7 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