Skip to content

manuphatak/pureyaml

Repository files navigation

pureyaml

Latest Version Development Status Build Status Coverage Status Documentation Status

Yet another yaml parser, in pure python.

Features

Installation

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

Usage

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

Credits

Tools used in rendering this package:

About

Yet Another YAML Parser, in pure python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published