Thanks to visit codestin.com
Credit goes to github.com

Skip to content

metov/pyyaml

 
 

Repository files navigation

PyYAML

The next generation YAML parser and emitter for Python.

Install

python setup.py install

By default, the setup.py script checks whether LibYAML is installed and if so, builds and installs LibYAML bindings.

  • Skip the check and force installation of LibYAML bindings:
    python setup.py --with-libyaml install
  • Disable the check and skip building and installing LibYAML bindings:
    python setup.py --without-libyaml install

Usage

When LibYAML bindings are installed, you may use fast LibYAML-based parser and emitter as follows:

data = yaml.load(stream, Loader=yaml.CLoader)
yaml.dump(data, Dumper=yaml.CDumper)

If you don't trust the input stream, you should use:

data = yaml.safe_load(stream)

Tests

PyYAML includes a comprehensive test suite. To run the tests, type python setup.py test.

Additional information

The PyYAML module was written by Kirill Simonov <[email protected]>. It is currently maintained by the YAML and Python communities.

PyYAML is released under the MIT license. See the file LICENSE for more details.

About

Canonical source repository for PyYAML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.4%
  • Other 1.6%