{"repo":"crdoconnor/strictyaml","free":true,"listed":false,"github":"https://github.com/crdoconnor/strictyaml","clone":"git clone https://github.com/crdoconnor/strictyaml.git","description":"Type-safe YAML parser and validator.","language":"Python","stars":1623,"topics":["yaml","parser","python","python3","strict-types","strict","strongly-typed","roundtrip","roundtripping","typesafe"],"license":"MIT","category":"dev-tools","readme_excerpt":"StrictYAML StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification. Priorities: - Beautiful API - Refusing to parse the ugly, hard to read and insecure features of YAML like the Norway problem. - Strict validation of markup and straightforward type casting. - Clear, readable exceptions with code snippets and line numbers . - Acting as a near-drop in replacement for pyyaml, ruamel.yaml or poyo. - Ability to read in YAML, make changes and write it out again with comments preserved. - Not speed, currently. Simple example: Default parse result: All data is string, list or OrderedDict: Quickstart with schema: 42 is now parsed as an integer: A YAMLError will be raised if there are syntactic problems, violations of your schema or use of disallowed YAML features: For example, a schema violation: If parsed correctly: You can modify values and write out the YAML with comments preserved: As well as look up line numbers: And construct YAML documents from dicts or lists: Install Why StrictYAML? There are a number of formats and approaches that can achieve more or less the same purpose as StrictYAML. I've tried to make it the best one. Below is a series of documented justifications: - Why avoid using environment variables as configuration? - Why not use HJSON? - Why not HOCON? - Why not use INI files? - Why not use JSON Schema for validation? - Why not JSON for simple configuration files? - Why not JSON5? - Why not use the YAML 1.2 stan","default_branch":null,"files":null,"tree":[],"storefront":"/r/crdoconnor","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/crdoconnor/strictyaml/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}