Skip to content

Substitutes the values of environment variables

License

Notifications You must be signed in to change notification settings

Coacher/pyenvsubst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyenvsubst

Substitutes the values of environment variables. Python version.

Features

  • Fully compatible with envsubst
  • Requires only Python itself and stdlib
  • Supports POSIX syntax for default values
  • Offers multiple quality-of-life features

Installation

Install the latest stable version via pip:

  pip install pyenvsubst

Install the latest development version via pip:

  pip install pip install pyenvsubst@git+https://github.com/Coacher/pyenvsubst.git

Usage

Substitute environment variables from STDIN, output to STDOUT:

  cat template.txt | pyenvsubst

Exclude specified environment variables from substitution, output to STDOUT:

  cat template.txt | pyenvsubst --exclude "$API_TOKEN"

Substitute environment variables from FOO.txt, output to BAR.txt:

  pyenvsubst --input=FOO.txt --output=BAR.txt

About

Substitutes the values of environment variables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages