Interpolate Yaml files with env vars
Project description
# Yamlenv
[![Build Status](https://travis-ci.org/lbolla/yamlenv.svg?branch=master)](https://travis-ci.org/lbolla/yamlenv)
Interpolate YaML files with environmental variables.
Given a YaML string like:
a: ${A}
b: 2
and an environmental variable `$A` with value `hello`, `yamlenv.load`
would return:
{
a: 'hello',
b: 2
}
Default values are supported:
yamlenv.load('''
a: ${A, 'hello'}
b: 2
''') == {
'a': 'hello',
'b': 2
}
More examples are available in the tests.
[![Build Status](https://travis-ci.org/lbolla/yamlenv.svg?branch=master)](https://travis-ci.org/lbolla/yamlenv)
Interpolate YaML files with environmental variables.
Given a YaML string like:
a: ${A}
b: 2
and an environmental variable `$A` with value `hello`, `yamlenv.load`
would return:
{
a: 'hello',
b: 2
}
Default values are supported:
yamlenv.load('''
a: ${A, 'hello'}
b: 2
''') == {
'a': 'hello',
'b': 2
}
More examples are available in the tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yamlenv-0.2.0.tar.gz
(2.4 kB
view hashes)