Skip to content
Yet Another YAML Parser, in pure python.
Python Makefile
Branch: develop
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
pureyaml
submodules
tests
yaml_org
.editorconfig
.gitignore
.gitmodules
.requirements.diff
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
requirements.in
requirements.txt
requirements_dev.in
requirements_dev.txt
setup.cfg
setup.py
tox.ini

README.rst

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:

You can’t perform that action at this time.