8000 GitHub - metov/pyyaml: Canonical source repository for PyYAML
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ pyyaml Public
forked from yaml/pyyaml

Canonical source repository for PyYAML

License

Notifications You must be signed in to change notification settings

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 <xi@resolvent.net>. 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

378F

Packages

No packages published

Languages

  • Python 98.4%
  • Other 1.6%
0