yamldict
Project description
Yamldict is a library that allows accessing YAML content as a kind of a dictionary. Its primary purpose is to allow reading and writing YAML content with ease.
To achieve that it has the following features:
Features
Easy creation of complex structures from string or files:
myyaml = yamldict.create(""" - "item 1" - "item 2" """)
Not a dictionary. That means a property such as get is still accessible from the object and isn’t a method on a dictionary.
>>> x = yamldict.YamlDict() >>> x.get = "x" >>> x YamlDict() {'get': 'x'}
Accessible via properties, or indexes:
assert myyaml["item"] == myyaml.item
Handles chained missing properties without creating them unless asked:
>>> myyaml = yamldict.YamlDict() >>> assert not myyaml.this.property.doesnt.exist >>> myyaml YamlDict() {} >>> myyaml.some.other.property = "3" >>> myyaml YamlDict() {'some': {'other': {'property': '3'}}}
It supports deep copying.
It’s integrated as a PyYaml serializer.
It supports pickle serialization.
Type support, so you don’t need to do anything in projects using mypy.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file yamldict-1.2.1.tar.gz
.
File metadata
- Download URL: yamldict-1.2.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89d4a40fb5a7e596e8caf73fe8d768252890924d8ec94446f401750287f0a8fc |
|
MD5 | b347ffb51412c99dda3eac3e76ab53c0 |
|
BLAKE2b-256 | c689cd0452cfb99205a85413d917cf07ac68df1aea62694346ddd2b1ba693bdf |