yay 0.0.21
pip install yay==0.0.21
Newer version available (3.1.1)
Released:
An extensible config file format
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache Software License)
- Author: John Carr
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
yay ain't YAML
==============
yay is a configuration file format built on top of YAML based on our experience with the ConfigParser extensions buildout uses. It adds overlays (one config file including and extending another) and variables.
Consider a config file that looks something like this::
foo:
bar:
baz:
- 1
- 2
- 3
qux: wibble.wobble
quux: wobble
goo:
bar:
baz:
- 1
- 2
- 3
- 4
qux: wibble.cobble
quux: cobble
hoo:
bar:
baz:
- 1
- 3
qux: wibble.yobble
quux: yobble
With yay, this might look like this::
foo:
bar:
baz:
- 1
- 2
- 3
qux: wibble.{:quux}
quux: wobble
goo.copy: foo
goo:
bar:
baz.append:
- 4
quux: cobble
hoo.copy: foo
hoo:
bar:
baz.remove:
- 2
quux: yobble
Using yay
---------
To load yay config from a string you can use the 'load' function::
>>> from yay import load
>>> load("""
... foo:
... bar: 1
... """)
{"foo": {"bar": 1}}
If you want to load from a URI (file:// and http:// are supported) then use 'load_uri'::
>>> from yay import load_uri
>>> load_uri("/etc/someconfig.yay")
{"foo": {"bar": 1}}
The return value in both cases is a standard python dictionary.
Changelog for yay
=================
0.0.21 (2011-07-19)
-------------------
- New .include directive that can use variables and appear anywhere in file
0.0.20 (2011-06-29)
-------------------
- Change ProtectedString to inherit from basestring
0.0.19 (2011-06-29)
-------------------
- Concept of a protected yay file, where any strings that end up containing
secrets will be obscured
- ProtectedString that handles concatenation of protected and unprocted strings
- GPG used to decrypt .yay.gpg files, any variables they spawn are protected
0.0.18 (2011-06-10)
-------------------
- Brown paper bag to remove stray debugging scaffold
0.0.17 (2011-06-10)
-------------------
- Fix appending to None
- Fix list access where list has already been partially resolved
0.0.16 (2011-06-10)
-------------------
- Add range tests, fixed range() as a {foo} to avoid this
- Function calls to python are implemented - there is now range()
- There is now a foo.select key so switch statements can be used
0.0.3 (2011-01-24)
------------------
- Egg packaging fixes
0.0.2 (2011-01-24)
------------------
- Lots more unittests for expression evaluation and expression parsing
- Drop dependency on OrderedDict
0.0.1
-----
- This is still pre-release, no API or language stability guarantees
- Variable resolving is now done in expression tree without a seperate resolve stage
- Uses pyparsing to parse {foo[bar][@.baz > 5]} type syntax
0.0.0
-----
- This is a pre-alpha release to experiment with what we can and can't do.
- New PyYAML Loader subclass for getting ordered maps without ugly !!omap markup
- Resolves {} markup within YAML nodes
- Lazily evaluates .copy, .append and .remove instructions
==============
yay is a configuration file format built on top of YAML based on our experience with the ConfigParser extensions buildout uses. It adds overlays (one config file including and extending another) and variables.
Consider a config file that looks something like this::
foo:
bar:
baz:
- 1
- 2
- 3
qux: wibble.wobble
quux: wobble
goo:
bar:
baz:
- 1
- 2
- 3
- 4
qux: wibble.cobble
quux: cobble
hoo:
bar:
baz:
- 1
- 3
qux: wibble.yobble
quux: yobble
With yay, this might look like this::
foo:
bar:
baz:
- 1
- 2
- 3
qux: wibble.{:quux}
quux: wobble
goo.copy: foo
goo:
bar:
baz.append:
- 4
quux: cobble
hoo.copy: foo
hoo:
bar:
baz.remove:
- 2
quux: yobble
Using yay
---------
To load yay config from a string you can use the 'load' function::
>>> from yay import load
>>> load("""
... foo:
... bar: 1
... """)
{"foo": {"bar": 1}}
If you want to load from a URI (file:// and http:// are supported) then use 'load_uri'::
>>> from yay import load_uri
>>> load_uri("/etc/someconfig.yay")
{"foo": {"bar": 1}}
The return value in both cases is a standard python dictionary.
Changelog for yay
=================
0.0.21 (2011-07-19)
-------------------
- New .include directive that can use variables and appear anywhere in file
0.0.20 (2011-06-29)
-------------------
- Change ProtectedString to inherit from basestring
0.0.19 (2011-06-29)
-------------------
- Concept of a protected yay file, where any strings that end up containing
secrets will be obscured
- ProtectedString that handles concatenation of protected and unprocted strings
- GPG used to decrypt .yay.gpg files, any variables they spawn are protected
0.0.18 (2011-06-10)
-------------------
- Brown paper bag to remove stray debugging scaffold
0.0.17 (2011-06-10)
-------------------
- Fix appending to None
- Fix list access where list has already been partially resolved
0.0.16 (2011-06-10)
-------------------
- Add range tests, fixed range() as a
- Function calls to python are implemented - there is now range()
- There is now a foo.select key so switch statements can be used
0.0.3 (2011-01-24)
------------------
- Egg packaging fixes
0.0.2 (2011-01-24)
------------------
- Lots more unittests for expression evaluation and expression parsing
- Drop dependency on OrderedDict
0.0.1
-----
- This is still pre-release, no API or language stability guarantees
- Variable resolving is now done in expression tree without a seperate resolve stage
- Uses pyparsing to parse {foo[bar][@.baz > 5]} type syntax
0.0.0
-----
- This is a pre-alpha release to experiment with what we can and can't do.
- New PyYAML Loader subclass for getting ordered maps without ugly !!omap markup
- Resolves {} markup within YAML nodes
- Lazily evaluates .copy, .append and .remove instructions
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache Software License)
- Author: John Carr
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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
File details
Details for the file yay-0.0.21.tar.gz
.
File metadata
- Download URL: yay-0.0.21.tar.gz
- Upload date:
- Size: 53.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f8eac715d71a5e69b8679c631a33022a8c6d463d61f0ce0cb39ce0a0038ebb |
|
MD5 | 77380ab164b024e0d1d4a1fd04edc1de |
|
BLAKE2b-256 | d0184d2777ecf160b2a27fd00c209bb7fad0c8e3dd4994763655147ae9664b7d |