Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

An extensible config file format

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

0.0.0

This is a pre-alpha release to experiment with what we can and can’t do.

Features

  • 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


Release history Release notifications

History Node

3.1.1

History Node

3.1.0

History Node

3.0.1

History Node

3.0

History Node

0.0.62

History Node

0.0.61

History Node

0.0.60

History Node

0.0.59

History Node

0.0.58

History Node

0.0.57

History Node

0.0.56

History Node

0.0.55

History Node

0.0.54

History Node

0.0.53

History Node

0.0.52

History Node

0.0.51

History Node

0.0.50

History Node

0.0.49

History Node

0.0.48

History Node

0.0.47

History Node

0.0.46

History Node

0.0.45

History Node

0.0.44

History Node

0.0.43

History Node

0.0.42

History Node

0.0.41

History Node

0.0.40

History Node

0.0.39

History Node

0.0.38

History Node

0.0.37

History Node

0.0.36

History Node

0.0.35

History Node

0.0.34

History Node

0.0.33

History Node

0.0.32

History Node

0.0.31

History Node

0.0.30

History Node

0.0.29

History Node

0.0.28

History Node

0.0.27

History Node

0.0.26

History Node

0.0.25

History Node

0.0.24

History Node

0.0.23

History Node

0.0.22

History Node

0.0.21

History Node

0.0.20

History Node

0.0.19

History Node

0.0.18

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.14

History Node

0.0.13

History Node

0.0.13dev

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

This version
History Node

0.0.1

History Node

0.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
yay-0.0.1.tar.gz (43.3 kB) Copy SHA256 hash SHA256 Source None Jan 20, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page