Yet another yaml parser, in pure python.
- Documentation: https://pureyaml.readthedocs.org
- Open Source: https://github.com/bionikspoon/pureyaml
- MIT license
- YAML encoder/decoder written in pure python
At the command line either via easy_install or pip
$ pip install pureyaml
$ easy_install pureyaml
Or, if you have virtualenvwrapper installed
$ mkvirtualenv pureyaml
$ pip install pureyaml
Uninstall
$ pip uninstall pureyaml
To use pureyaml in a project
import pureyaml
>>> import pureyaml
>>> from textwrap import dedent
>>> from pprint import pprint
>>> text = dedent("""
... marvel:
... - iron man
... - the hulk
... - captain america
... dc:
... - batman
... - the joker
... - superman
... """)[1:]
>>> pprint(pureyaml.load(text))
{'dc': ['batman', 'the joker', 'superman'],
'marvel': ['iron man', 'the hulk', 'captain america']}
>>> print(pureyaml.dump(pureyaml.load(text)))
dc:
- batman
- the joker
- superman
marvel:
- iron man
- the hulk
- captain america
Tools used in rendering this package: