Skip to main content

ruamel.yaml

ruamel.yaml is a YAML 1.2 loader/dumper package for Python.

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.

https://readthedocs.org/projects/yaml/badge/?version=stable https://bestpractices.coreinfrastructure.org/projects/1128/badge

ChangeLog

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):
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):
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):
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):
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ruamel.yaml-0.15.33.tar.gz (260.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ruamel.yaml-0.15.33-cp36-cp36m-win_amd64.whl (187.0 kB view details)

Uploaded CPython 3.6mWindows x86-64

ruamel.yaml-0.15.33-cp36-cp36m-win32.whl (172.7 kB view details)

Uploaded CPython 3.6mWindows x86

ruamel.yaml-0.15.33-cp36-cp36m-manylinux1_x86_64.whl (557.7 kB view details)

Uploaded CPython 3.6m

ruamel.yaml-0.15.33-cp35-cp35m-win_amd64.whl (187.0 kB view details)

Uploaded CPython 3.5mWindows x86-64

ruamel.yaml-0.15.33-cp35-cp35m-win32.whl (172.7 kB view details)

Uploaded CPython 3.5mWindows x86

ruamel.yaml-0.15.33-cp35-cp35m-manylinux1_x86_64.whl (557.5 kB view details)

Uploaded CPython 3.5m

ruamel.yaml-0.15.33-cp34-cp34m-win_amd64.whl (189.8 kB view details)

Uploaded CPython 3.4mWindows x86-64

ruamel.yaml-0.15.33-cp34-cp34m-win32.whl (178.9 kB view details)

Uploaded CPython 3.4mWindows x86

ruamel.yaml-0.15.33-cp34-cp34m-manylinux1_x86_64.whl (564.0 kB view details)

Uploaded CPython 3.4m

ruamel.yaml-0.15.33-cp33-cp33m-win_amd64.whl (189.6 kB view details)

Uploaded CPython 3.3mWindows x86-64

ruamel.yaml-0.15.33-cp33-cp33m-win32.whl (178.9 kB view details)

Uploaded CPython 3.3mWindows x86

ruamel.yaml-0.15.33-cp33-cp33m-manylinux1_x86_64.whl (538.2 kB view details)

Uploaded CPython 3.3m

ruamel.yaml-0.15.33-cp27-cp27mu-manylinux1_x86_64.whl (534.1 kB view details)

Uploaded CPython 2.7mu

ruamel.yaml-0.15.33-cp27-cp27m-win_amd64.whl (190.6 kB view details)

Uploaded CPython 2.7mWindows x86-64

ruamel.yaml-0.15.33-cp27-cp27m-win32.whl (178.8 kB view details)

Uploaded CPython 2.7mWindows x86

ruamel.yaml-0.15.33-cp27-cp27m-manylinux1_x86_64.whl (534.1 kB view details)

Uploaded CPython 2.7m

File details

Details for the file ruamel.yaml-0.15.33.tar.gz.

File metadata

  • Download URL: ruamel.yaml-0.15.33.tar.gz
  • Upload date:
  • Size: 260.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ruamel.yaml-0.15.33.tar.gz
Algorithm Hash digest
SHA256 2d0c3d80dc5e0b6bb8ca6f9b961b1a87b5e67c7ce774287b2773de64f9078be8
MD5 829931bf26153083d5430e5ee4d57b73
BLAKE2b-256 b15c6adf3743c8ad8d508b94706e23efc8362216c620598e477532eeadda0120

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1e658782d8c41d01ccc5fc5071a7b9692497eec49ed7e7ed829f57fdeead7a00
MD5 9a7f3934da4530dd5e31b8b30bd4e3e1
BLAKE2b-256 73fdabb8c1272c81620c21906d976ef53bd8efc0143f8758c89bf90f0697d396

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 9e989f807fc092c8b2a2350d99916bd757551658aad32985b67af981fa31b349
MD5 c13749ea5608cec71e09f5a71a6a2a29
BLAKE2b-256 6ca122e5087ce0c49292c0e4108c8736d11af27f5c5ad41e390695b68bb30349

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a7f8b9a20f6598d638cee9e9e2cb97c89ac7217ab56fbce394f5f6008491ab68
MD5 ef66e3cee2b45b75b5758afdb262c947
BLAKE2b-256 74fb96bc901c2314a605778449c9beaf50c2623b33cc5f30c1a3515393aeed10

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 85bcfb0dc41fda091f78c2dfe56841cc3068def386e69b88f0a09c0a7d66f4ef
MD5 be83c85d80008794d4af410ed97589df
BLAKE2b-256 0c01844eb16b01f2a69b2a2876c3c9456967c9112c6f508aab4e51d66f6d66b7

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 f6f15a92228c33ad5a6179b8e3e46e1c52351b11dc73fbf5c4dd7ecadc4d455c
MD5 d8f8a6dd2fd3f175577e2cf17272bbea
BLAKE2b-256 036a257bbe95673093bae960db9db2fe130e50b82e4942544fbdd55095e78bf9

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4a316df3d2f18255486ef063a10cbee367582280407b8716f138945539a1d673
MD5 9f80eb4c3acd4ec72985c281cfee35a3
BLAKE2b-256 36d86f59c9bf146af875e47c07a3f22807ae8bfc4f5aedcdcf61138af07ef9a2

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 25016e3343e924e0e4a402f7a89dd32b2389bac785564d7dff570dcca3be9207
MD5 65f53922911bfe5ffee3532c078adc71
BLAKE2b-256 9385b06a6d813bac8afd2c6b26a0965dedb7533889fd4774fe6d79698cce8f7d

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 dc63f25af8e3fc90faaa272cbffa53eca908b6c9069d17220a30d36a66494112
MD5 692003e42671518d48226534d4ab0c13
BLAKE2b-256 5e0c4f3411e89be50a9fc2212df271b03b79cd7b5dbb98a71f7da0fab2d973a2

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f62c63741212f51a56a426d6c5947b8eec11b56a4990e607761663c51a4dae7c
MD5 7624745f4875bb301a54f824f2c45981
BLAKE2b-256 ca1d8ae77e40ad95b9a0927a3dc420d1d1bcd29125b491e3e8fd1db04ccf3789

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp33-cp33m-win_amd64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 fa00783366259d99db659619102a2a85b4fe15555b7a16902c5d76e60bf052be
MD5 a2bee184f6ab22817f9ff5436416fe66
BLAKE2b-256 7703e665b7332ad49b924997d4a30522e63aa7e5beb3a53c910dc4c368979034

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp33-cp33m-win32.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 b59c4c8e733ecbdb7664c9d89d23199445e8c5cb46aaf2fa0564963f1ccc0fb6
MD5 f26c1138f7aec0a717dc40fcfd4ebc61
BLAKE2b-256 4ff1d70068323ad4a5731cfd0bb82236b516cc80be0c83bbcbf9d64254211367

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp33-cp33m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2e68793f8e55ec21dcc34d28c3c4582b0c154d75627f48796e937e562b872963
MD5 28c44ef590a1b0b9e04cec82f429cad9
BLAKE2b-256 a18118f017dd63001543078fea247e2c6dbd0b46834c035810e710990ec68b9d

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 467aee5f32618eecf1bbdf4fe0c8fb1c4e80cc187a60bafe8e3f251be210ed21
MD5 cf624ca1c005fb5aa68096496c68e171
BLAKE2b-256 91dd7d91d59acc61d0ced86be195296650ad93e134d815f43cff4f72ff0c7bee

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 604d70249726f2c617f7e410f360fbb49f75ba6fd3212e0205f643236a886ccd
MD5 237f3ae5c1a6d05a00627a9c8761647d
BLAKE2b-256 eb6587922aa59527c5027cbc4e5df84d00d0337602f20ccb7eb5c30de48d6518

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 0275c64d971432977a512cbdabfd3d36ae732ed6a86888c3a9554d48a1b54ffd
MD5 5b9838cffadb8cd911b4831c6ef3199e
BLAKE2b-256 2e845dd57466af58e0da883439d6d46372e48f007b965454bca74b1dc6a1d357

See more details on using hashes here.

File details

Details for the file ruamel.yaml-0.15.33-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for ruamel.yaml-0.15.33-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7b837c0cd973e6dcb9f9073fe7ff282159c0ca7be923de5e28e98fee6ea3f8e8
MD5 1a4fe394af548b8a9c76b5342597d4a2
BLAKE2b-256 aef6d9b77f52d690625a9a86e8489cdfc5c9c15bc316848a722f1c4ee6996e15

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page