Canonical source repository for PyYAML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Matt Davis 0abad85a17
security disclosure docs
1 month ago
.github security disclosure docs 1 month ago
examples Use full_load in yaml-highlight example (#359) 3 years ago
lib 6.0 release 10 months ago
packaging/build Omnibus CI/artifact build update 11 months ago
tests The yaml.load{,_all} functions require Loader= now 11 months ago
yaml Remove Python 2 support and simplify 11 months ago
.gitignore Move code from lib3 to lib 11 months ago
CHANGES 6.0 release 10 months ago
LICENSE 5.4 release 2 years ago
MANIFEST.in Move code from lib3 to lib 11 months ago
Makefile Makefile tweaks 11 months ago
README.md 6.0b1 release 10 months ago
announcement.msg 6.0 release 10 months ago
pyproject.toml Add a newline character to end of pyproject.toml 2 years ago
setup.py 6.0 release 10 months ago
tox.ini Add Python 3.10 to tox.ini 10 months ago

README.md

PyYAML

A full-featured YAML processing framework for Python

Installation

To install, type python setup.py install.

By default, the setup.py script checks whether LibYAML is installed and if so, builds and installs LibYAML bindings. To skip the check and force installation of LibYAML bindings, use the option --with-libyaml: python setup.py --with-libyaml install. To disable the check and skip building and installing LibYAML bindings, use --without-libyaml: python setup.py --without-libyaml install.

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

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

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

>>> yaml.safe_load(stream)

Testing

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

Further Information

License

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.