Substitute environment variables in a string
Project description
Substitute environment variables in a string:
>>> import os >>> from envsubst import envsubst >>> del os.environ['PS1'] >>> print(envsubst('$USER@$HOST ${PS1:-$}:')) ashafer01@github.com $: >>> os.environ['PS1'] = '' >>> print(envsubst('$USER@$HOST ${PS1:-$}:')) ashafer01@github.com $: >>> print(envsubst('$USER@$HOST ${PS1-foo}:')) ashafer01@github.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
envsubst-0.1.1.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file envsubst-0.1.1.tar.gz
.
File metadata
- Download URL: envsubst-0.1.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0bbc54549a5ecb3b4972d16f13bed4d497f11795bc5c7ecb05ac79164c5da7b |
|
MD5 | acb119245697e86cdfed22e0047cd8fc |
|
BLAKE2b-256 | a866cf0fd3d191dfd54628d316d4dfc3a1454953ac71df8c9d7cb75b9c924ee5 |
File details
Details for the file envsubst-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: envsubst-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8fc605925b83389ad42a0f8a8f97d129c02856e7a19f485627d46deaf246dec |
|
MD5 | e5f05de042fbcf1ad51d21680f37ec57 |
|
BLAKE2b-256 | f4e16f546f7dbab7255662ea7df840389609cf79f5ecca8d8ec7962fbceaeec4 |