Project Description

PyYAML is a YAML processor in python, and it was one of the first libraries written for YAML. It is used by tools like Ansible or Saltstack.

It was written when YAML 1.1 came out, but was never updated for the new Schema introduced by YAML 1.2.

Look here for an overview of Schemas/Types in YAML 1.1 and 1.2

As you can see there, in YAML 1.1 many strings are recognized as booleans. One promiment one is NO, the country code for Norway, which is read as a boolean False, when unquoted.

This was improved in YAML 1.2 by reducing the number of boolean strings, but so far not implemented by many libraries.

I have been working on a lot of YAML related stuff in the past years, and YAML 1.2 support for PyYAML is something which is requested regularly.

Goal for this Hackweek

I want to add support for the YAML 1.2 Core and JSON Schemas.

Luckily the corresponding test data is already there.

At the end of hackweek, it should be possible to create a PyYAML loader class that loads a YAML 1.2 document.

The branch I'm working on: yaml12


If you are a PyYAML user and know a bit about custom loaders, you can help by discussing the API for the new methods.

You can reach me in our internal chat or in freenode#pyyaml



Some weeks ago I already added the test data for the existing YAML 1.1 types, so that adding the tests for the 1.2 Schemas wasn't much work.

I made already progress on Tuesday and Wednesday, so tests are already running successfully, but the challenge now is to create a good API, that is flexible and easy.

On Thursday and Friday I fixed minor issues and updated the related PRs:

Then I created a draft PR:

This will probably take a while until it gets merged (or rejected). Happy for feedback!

Looking for hackers with the skills:

python yaml

This project is part of:

Hack Week 20


  • 10 months ago: enavarro_suse liked this project.
  • 10 months ago: cdywan liked this project.
  • 10 months ago: okurz liked this project.
  • 10 months ago: tinita added keyword "python" to this project.
  • 10 months ago: tinita added keyword "yaml" to this project.
  • 10 months ago: tinita started this project.
  • 10 months ago: tinita originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Resurrect NWS CLI project by seanmarlow

    Project Description

    Many years back I cre...

    k8s-rook-client by haass

    [comment]: # (Please use the project descriptio...

    Build Microservice Architecture with Kubernetes by aqsa_malik

    Project Description

    The aim of the project ...

    Create short "videos/screencasts" demoing cool stuff in 5 minutes by PSuarezHernandez

    [comment]: # (Please use the project descriptio...

    Develop a monitoring system with web frontend for virtualization servers by nzhang

    [comment]: # (Please use the project descriptio...