yatiml/yatiml: Release 0.8.0
Description
YAtiML
YAML-based file formats can be very handy, as YAML is easy to write by humans, and parsing support for it is widely available. Just read your YAML file into a document structure (a tree of nested dicts and lists), and manipulate that in your code.
As long as that YAML file contains exactly what you expect, that works fine. But if it contains a mistake, then you're likely to crash the program with a cryptic error message, or worse (especially if the YAML file was loaded from the Internet) it may do something unexpected.
To avoid that, you can validate your YAML using various schema checkers. You write a description of what your YAML file must look like, then feed that to a library which checks the incoming file against the description. That gives you a better error message, but it's a lot of work.
YAtiML takes a different approach. Instead of a schema, you write a Python class. You probably already know how to do that, so no need to learn anything. YAtiML then generates loading and dumping functions for you, which convert between YAML and Python objects. If needed, you can add some extra code to make the YAML look nicer or implement special features.
0.8.0 Incompatible changes- Accept explicit tags only if compatible with the recognised type(s)
- Support for untyped documents and attributes
- Support for Any-typed documents and attributes
- Support for Python dataclasses
- Dumping of OrderedDict to a file (but not to a string) produced a stray !!omap.
- Various fixes and improvements to development infrastructure
- Official support for Python 3.5, which is no longer supported upstream. It will probably still work, but getting anything to install on 3.5 is getting to be pretty difficult so it's probably time to upgrade.
Files
yatiml/yatiml-0.8.0.zip
Files
(101.7 kB)
Name | Size | Download all |
---|---|---|
md5:fb9236f18290306c982fa974776a2b0d
|
101.7 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/yatiml/yatiml/tree/0.8.0 (URL)