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
File details
Details for the file dotenv-0.0.2.tar.gz.
File metadata
- Download URL: dotenv-0.0.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a35c7afd2a1584ccfdcd2af22994b125846ded1fa08ef4a831f4e2281303100
|
|
| MD5 |
e5ecdcaec988f3b1f41418801f7dc177
|
|
| BLAKE2b-256 |
ca41d922e0b32beaf7251ff1540a4b5a13c54d6bc25ccd9704294524a1f3af17
|