ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
Project description
ruamel.yaml
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
- version:
0.15.40
- updated:
2018-06-18
- documentation:
- repository:
- pypi:
Starting with version 0.15.0 the way YAML files are loaded and dumped is changing. See the API doc for details. Currently existing functionality will throw a warning before being changed/removed. For production systems you should pin the version being used with ``ruamel.yaml<=0.15``. There might be bug fixes in the 0.14 series, but new functionality is likely only to be available via the new API.
If your package uses ruamel.yaml and is not listed on PyPI, drop me an email, preferably with some infomormation on how you use the package (or a link to bitbucket/github) and I’ll keep you informed when the status of the API is stable enough to make the transition.
ChangeLog
- 0.15.40 (2018-06-18):
added links to landing places as suggested in issue 190 by KostisA
fixes issue #201: decoding unicode escaped tags on Python2, reported by Dan Abolafia
- 0.15.39 (2018-06-17):
merge PR27 improving package startup time (and loading when regexp not actually used), provided by Marcel Bargull
- 0.15.38 (2018-06-13):
fix for losing precision when roundtripping floats by Rolf Wojtech
fix for hardcoded dir separator not working for Windows by Nuno André
typo fix by Andrey Somov
- 0.15.37 (2018-03-21):
again trying to create installable files for 187
- 0.15.36 (2018-02-07):
fix issue 187, incompatibility of C extension with 3.7 (reported by Daniel Blanchard)
- 0.15.35 (2017-12-03):
allow None as stream when specifying transform parameters to YAML.dump(). This is useful if the transforming function doesn’t return a meaningful value (inspired by StackOverflow by rsaw).
- 0.15.34 (2017-09-17):
fix for issue 157: CDumper not dumping floats (reported by Jan Smitka)
- 0.15.33 (2017-08-31):
support for “undefined” round-tripping tagged scalar objects (in addition to tagged mapping object). Inspired by a use case presented by Matthew Patton on StackOverflow.
fix issue 148: replace cryptic error message when using !!timestamp with an incorrectly formatted or non- scalar. Reported by FichteFoll.
- 0.15.32 (2017-08-21):
allow setting yaml.default_flow_style = None (default: False) for for typ='rt'.
fix for issue 149: multiplications on ScalarFloat now return float (reported by jan.brezina@tul.cz)
- 0.15.31 (2017-08-15):
fix Comment dumping
- 0.15.30 (2017-08-14):
fix for issue with “compact JSON” not parsing: {"in":{},"out":{}} (reported on StackOverflow by mjalkio
- 0.15.29 (2017-08-14):
fix issue #51: different indents for mappings and sequences (reported by Alex Harvey)
fix for flow sequence/mapping as element/value of block sequence with sequence-indent minus dash-offset not equal two.
- 0.15.28 (2017-08-13):
fix issue #61: merge of merge cannot be __repr__-ed (reported by Tal Liron)
- 0.15.27 (2017-08-13):
fix issue 62, YAML 1.2 allows ? and : in plain scalars if non-ambigious (reported by nowox)
fix lists within lists which would make comments disappear
- 0.15.26 (2017-08-10):
fix for disappearing comment after empty flow sequence (reported by oit-tzhimmash)
- 0.15.25 (2017-08-09):
fix for problem with dumping (unloaded) floats (reported by eyenseo)
- 0.15.24 (2017-08-09):
added ScalarFloat which supports roundtripping of 23.1, 23.100, 42.00E+56, 0.0, -0.0 etc. while keeping the format. Underscores in mantissas are not preserved/supported (yet, is anybody using that?).
(finally) fixed longstanding issue 23 (reported by Antony Sottile), now handling comment between block mapping key and value correctly
warn on YAML 1.1 float input that is incorrect (triggered by invalid YAML provided by Cecil Curry)
allow setting of boolean representation (false, true) by using: yaml.boolean_representation = [u'False', u'True']
- 0.15.23 (2017-08-01):
fix for round_tripping integers on 2.7.X > sys.maxint (reported by ccatterina)
- 0.15.22 (2017-07-28):
fix for round_tripping singe excl. mark tags doubling (reported and fix by Jan Brezina)
- 0.15.21 (2017-07-25):
fix for writing unicode in new API, (reported on StackOverflow
- 0.15.20 (2017-07-23):
wheels for windows including C extensions
- 0.15.19 (2017-07-13):
added object constructor for rt, decorator yaml_object to replace YAMLObject.
fix for problem using load_all with Path() instance
fix for load_all in combination with zero indent block style literal (pure=True only!)
- 0.15.18 (2017-07-04):
missing pure attribute on YAML useful for implementing !include tag constructor for including YAML files in a YAML file
some documentation improvements
trigger of doc build on new revision
- 0.15.17 (2017-07-03):
support for Unicode supplementary Plane output (input was already supported, triggered by this Stack Overflow Q&A)
- 0.15.16 (2017-07-01):
minor typing issues (reported and fix provided by Manvendra Singh
small doc improvements
- 0.15.15 (2017-06-27):
fix for issue 135, typ=’safe’ not dumping in Python 2.7 (reported by Andrzej Ostrowski <https://bitbucket.org/aostr123/>`__)
- 0.15.14 (2017-06-25):
fix for issue 133, in setup.py: change ModuleNotFoundError to ImportError (reported and fix by Asley Drake)
- 0.15.13 (2017-06-24):
suppress duplicate key warning on mappings with merge keys (reported by Cameron Sweeney)
- 0.15.12 (2017-06-24):
remove fatal dependency of setup.py on wheel package (reported by Cameron Sweeney)
- 0.15.11 (2017-06-24):
fix for issue 130, regression in nested merge keys (reported by David Fee)
- 0.15.10 (2017-06-23):
top level PreservedScalarString not indented if not explicitly asked to
remove Makefile (not very useful anyway)
some mypy additions
- 0.15.9 (2017-06-16):
fix for issue 127: tagged scalars were always quoted and seperated by a newline when in a block sequence (reported and largely fixed by Tommy Wang)
- 0.15.8 (2017-06-15):
allow plug-in install via install ruamel.yaml[jinja2]
- 0.15.7 (2017-06-14):
add plug-in mechanism for load/dump pre resp. post-processing
- 0.15.6 (2017-06-10):
a set() with duplicate elements now throws error in rt loading
support for toplevel column zero literal/folded scalar in explicit documents
- 0.15.5 (2017-06-08):
repeat load() on a single YAML() instance would fail.
- 0.15.4 (2017-06-08):
transform parameter on dump that expects a function taking a string and returning a string. This allows transformation of the output before it is written to stream. This forces creation of the complete output in memory!
some updates to the docs
- 0.15.3 (2017-06-07):
No longer try to compile C extensions on Windows. Compilation can be forced by setting the environment variable RUAMEL_FORCE_EXT_BUILD to some value before starting the pip install.
- 0.15.2 (2017-06-07):
update to conform to mypy 0.511: mypy –strict
- 0.15.1 (2017-06-07):
duplicate keys in mappings generate an error (in the old API this change generates a warning until 0.16)
dependecy on ruamel.ordereddict for 2.7 now via extras_require
- 0.15.0 (2017-06-04):
it is now allowed to pass in a pathlib.Path as “stream” parameter to all load/dump functions
passing in a non-supported object (e.g. a string) as “stream” will result in a much more meaningful YAMLStreamError.
assigning a normal string value to an existing CommentedMap key or CommentedSeq element will result in a value cast to the previous value’s type if possible.
added YAML class for new API
- 0.14.12 (2017-05-14):
fix for issue 119, deepcopy not returning subclasses (reported and PR by Constantine Evans <cevans@evanslabs.org>)
- 0.14.11 (2017-05-01):
fix for issue 103 allowing implicit documents after document end marker line (...) in YAML 1.2
- 0.14.10 (2017-04-26):
fix problem with emitting using cyaml
- 0.14.9 (2017-04-22):
remove dependency on typing while still supporting mypy (http://stackoverflow.com/a/43516781/1307905)
fix unclarity in doc that stated 2.6 is supported (reported by feetdust)
- 0.14.8 (2017-04-19):
fix Text not available on 3.5.0 and 3.5.1, now proactively setting version guards on all files (reported by João Paulo Magalhães)
- 0.14.7 (2017-04-18):
round trip of integers (decimal, octal, hex, binary) now preserve leading zero(s) padding and underscores. Underscores are presumed to be at regular distances (i.e. 0o12_345_67 dumps back as 0o1_23_45_67 as the space from the last digit to the underscore before that is the determining factor).
- 0.14.6 (2017-04-14):
binary, octal and hex integers are now preserved by default. This was a known deficiency. Working on this was prompted by the issue report (112) from devnoname120, as well as the additional experience with .replace() on scalarstring classes.
fix issues 114: cannot install on Buildozer (reported by mixmastamyk). Setting env. var RUAMEL_NO_PIP_INSTALL_CHECK will suppress pip-check.
- 0.14.5 (2017-04-04):
fix issue 109: None not dumping correctly at top level (reported by Andrea Censi)
fix issue 110: .replace on Preserved/DoubleQuoted/SingleQuoted ScalarString would give back “normal” string (reported by sandres23)
- 0.14.4 (2017-03-31):
fix readme
- 0.14.3 (2017-03-31):
fix for 0o52 not being a string in YAML 1.1 (reported on StackOverflow Q&A 43138503 by Frank D)
- 0.14.2 (2017-03-23):
fix for old default pip on Ubuntu 14.04 (reported by Sébastien Maccagnoni-Munch)
- 0.14.1 (2017-03-22):
fix Text not available on 3.5.0 and 3.5.1 (reported by Charles Bouchard-Légaré)
- 0.14.0 (2017-03-21):
updates for mypy –strict
preparation for moving away from inheritance in Loader and Dumper, calls from e.g. the Representer to the Serializer.serialize() are now done via the attribute .serializer.serialize(). Usage of .serialize() outside of Serializer will be deprecated soon
some extra tests on main.py functions
For older changes see the file CHANGES
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file ruamel.yaml-0.15.40.tar.gz
.
File metadata
- Download URL: ruamel.yaml-0.15.40.tar.gz
- Upload date:
- Size: 278.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 974e91b23273eb6c32aef979a32c20ed0f6c6e4d9c1523611ea10c5fda9b8928 |
|
MD5 | 2bd9ba0c829b62500677593aeb7c72f5 |
|
BLAKE2b-256 | e02610610091320ac7ad2904649baecc9ab33cd47cbbf3af6a9cbd32d6a4df73 |
File details
Details for the file ruamel.yaml-0.15.40-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 204.3 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fc8bafd7d3a54dfdb4bd8bd0ee6ed12100d8125149d818cbce9f0d694121bbe |
|
MD5 | a38ab642981f5b1f4a81fbc9ae6bd0e4 |
|
BLAKE2b-256 | be0d1f794ed900654ebc2ce4b4401d5c587afaf65fbd531f02345507ea4b27ee |
File details
Details for the file ruamel.yaml-0.15.40-cp36-cp36m-win32.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp36-cp36m-win32.whl
- Upload date:
- Size: 184.6 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06bb1cd211704a90e4d8e9f66f9baa6345300106d8e156acbc4061d513d40201 |
|
MD5 | a3eceef79307388ce83ea02456c95d02 |
|
BLAKE2b-256 | 02babaad2b7942d680b3a320e9205b2534af038563a423fa55d460265f556b84 |
File details
Details for the file ruamel.yaml-0.15.40-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 643.0 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e9496033a2592e342be5c5c7846a05504077f843fb52de7fff4bd85484cd99 |
|
MD5 | d353d725f18193b7b232187429cfa588 |
|
BLAKE2b-256 | b98b809379f7bb8e97279a0f5c4c316a77e3ab315868c7d2da1c6b0d7f4caa9f |
File details
Details for the file ruamel.yaml-0.15.40-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 201.2 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ef2c81d03a18ac20bae4e6563cf6a547eac4f22147dd9ce91430f68b35561f1 |
|
MD5 | aeda50f3d282a5c4d8314b15bdf865e6 |
|
BLAKE2b-256 | 92f41d64e1c7f6b1c5d10d696607e85dbbb2ffb0f6abd7d847b07a3b1db4f8d7 |
File details
Details for the file ruamel.yaml-0.15.40-cp35-cp35m-win32.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp35-cp35m-win32.whl
- Upload date:
- Size: 181.7 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c239fd438cbfab8f0af02b931ee4205821a615659475c87983bc866590104141 |
|
MD5 | aac422d39af8e2d72c0c907cab5afd54 |
|
BLAKE2b-256 | 59c8644199badf40512b271953d724eed6356d2b503e2773322675b3b10ade2c |
File details
Details for the file ruamel.yaml-0.15.40-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 623.2 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1dc969b690c38928f1ea25a86b0288d2c0aa9cb6f549bedbcb69deef8da975c |
|
MD5 | 09dc7aa7b078ad823d8d2c47c0742a54 |
|
BLAKE2b-256 | da3aefafe2544b94496160b7aca8bc6ef38ce14ff26ae10a851bc267cc600aa2 |
File details
Details for the file ruamel.yaml-0.15.40-cp34-cp34m-win_amd64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp34-cp34m-win_amd64.whl
- Upload date:
- Size: 203.3 kB
- Tags: CPython 3.4m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 961e6e1f41054140466ab5479a4c5c20e569fc40ac5f7fbdde62f97993db8aec |
|
MD5 | 89f822b18360d08f2436a989a0f6e9e0 |
|
BLAKE2b-256 | 5293c0cf3db8932e6582f838c5aed1389269db6a661a87c8bded49be582a4d87 |
File details
Details for the file ruamel.yaml-0.15.40-cp34-cp34m-win32.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp34-cp34m-win32.whl
- Upload date:
- Size: 189.9 kB
- Tags: CPython 3.4m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3908c5b389b1543118b8b85ad48299969cd5d1ed22b2a2d8c4d6d9a3f3cfa24f |
|
MD5 | abba36b1ddc727dbb6952eda6db81f5a |
|
BLAKE2b-256 | e1ccce16fa4c84e52e55978390a765654bfc3cfbd69649e17ba5e58d9974c8dd |
File details
Details for the file ruamel.yaml-0.15.40-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 633.3 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 345f8c276b1af138f243a560c4f21884d7c150559ab13e344070044c73a31ab5 |
|
MD5 | 04421ae6b9f253c88996f720dc41288b |
|
BLAKE2b-256 | 4853ee93baa26986e0ee96da4fc52fd0e4930fe7f5423a02719fb3b3273c6156 |
File details
Details for the file ruamel.yaml-0.15.40-cp33-cp33m-win_amd64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp33-cp33m-win_amd64.whl
- Upload date:
- Size: 209.7 kB
- Tags: CPython 3.3m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 384cb3fbc0c7eb0166cc009e6410e295f25c663e22b0e93ec62b1dc0c7fddc4e |
|
MD5 | 8e029ea7e0f8243cd7d09e4619189b8c |
|
BLAKE2b-256 | 0cc622ba52477950d91ce2f24d6ff1e6221d9c465708fae581f1b9aab3ec4a14 |
File details
Details for the file ruamel.yaml-0.15.40-cp33-cp33m-win32.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp33-cp33m-win32.whl
- Upload date:
- Size: 196.1 kB
- Tags: CPython 3.3m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b17c95c542e3caf2c85db739fe8c69c4589c3d7fd8f59c1bc68891126eb351 |
|
MD5 | 5b827ba61bb77dfd3f06e0fb84b7e96d |
|
BLAKE2b-256 | cb2aa418834514b07719d2a0141ffb7618403e06a6265efad351cd8cb6cf90f7 |
File details
Details for the file ruamel.yaml-0.15.40-cp33-cp33m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp33-cp33m-manylinux1_x86_64.whl
- Upload date:
- Size: 602.8 kB
- Tags: CPython 3.3m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac65e8b668dde7a7804a039ee31f66e3b316dadeeaf506b0b6de1c51ff44ad81 |
|
MD5 | c38e0beb580ae09552f6374a89e307ab |
|
BLAKE2b-256 | 8511470050c1f0046bfc46777faacad5a03ddbb85fbdce7087dea98dc533bcf2 |
File details
Details for the file ruamel.yaml-0.15.40-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 591.4 kB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bfd91e4c23a00871f83046db312dd5071fcc56be82228e5560440b85d73f197 |
|
MD5 | 1d0e312b4e5082504f0fc8e72d8e5388 |
|
BLAKE2b-256 | ec2b2cade2f58d9504efe868130d420f4581dc0a5c956062fea1c048fcf6b278 |
File details
Details for the file ruamel.yaml-0.15.40-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 208.1 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d244bc3bb6adce091e20692ad82c465a6fb27a5df0c7e8c8005d5c51f0cbded |
|
MD5 | eacfccbbffef2d259f68c909070ac17f |
|
BLAKE2b-256 | 98e4d5606781e25dd1d4cec4fab3a67d2495254aac60c4b2dac5f50d902c5fab |
File details
Details for the file ruamel.yaml-0.15.40-cp27-cp27m-win32.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp27-cp27m-win32.whl
- Upload date:
- Size: 189.9 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68413b9a849261cf0d904c11670f4153f93baf6ce1ec40c5b8c7a81b1c9130f3 |
|
MD5 | e0fe7ea0e0bbb0d335ff2bb1b51c5dcd |
|
BLAKE2b-256 | 414fefe5765e85019800e0822d1389b447993ba83ba2a6a4d78e406e73594763 |
File details
Details for the file ruamel.yaml-0.15.40-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ruamel.yaml-0.15.40-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 591.4 kB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa829110c77f237d7041391db4501374d7b9672dce2fe49c805345f1712d7cf |
|
MD5 | 3bc63d2299b2d4a17bfa0dc0f41c2ca7 |
|
BLAKE2b-256 | 4a7942e296223c30d131c69f5be43e5ebee08a028a71e9e5a7e35a467b21a123 |