Skip to main content

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.

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.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

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

ruamel.yaml-0.15.20.tar.gz (252.7 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.20-cp36-cp36m-win_amd64.whl (180.2 kB view details)

Uploaded CPython 3.6mWindows x86-64

ruamel.yaml-0.15.20-cp36-cp36m-win32.whl (166.0 kB view details)

Uploaded CPython 3.6mWindows x86

ruamel.yaml-0.15.20-cp36-cp36m-manylinux1_x86_64.whl (550.9 kB view details)

Uploaded CPython 3.6m

ruamel.yaml-0.15.20-cp35-cp35m-win_amd64.whl (180.2 kB view details)

Uploaded CPython 3.5mWindows x86-64

ruamel.yaml-0.15.20-cp35-cp35m-win32.whl (165.9 kB view details)

Uploaded CPython 3.5mWindows x86

ruamel.yaml-0.15.20-cp35-cp35m-manylinux1_x86_64.whl (550.7 kB view details)

Uploaded CPython 3.5m

ruamel.yaml-0.15.20-cp34-cp34m-win_amd64.whl (183.0 kB view details)

Uploaded CPython 3.4mWindows x86-64

ruamel.yaml-0.15.20-cp34-cp34m-win32.whl (172.2 kB view details)

Uploaded CPython 3.4mWindows x86

ruamel.yaml-0.15.20-cp34-cp34m-manylinux1_x86_64.whl (557.3 kB view details)

Uploaded CPython 3.4m

ruamel.yaml-0.15.20-cp33-cp33m-win_amd64.whl (182.9 kB view details)

Uploaded CPython 3.3mWindows x86-64

ruamel.yaml-0.15.20-cp33-cp33m-win32.whl (172.1 kB view details)

Uploaded CPython 3.3mWindows x86

ruamel.yaml-0.15.20-cp33-cp33m-manylinux1_x86_64.whl (531.5 kB view details)

Uploaded CPython 3.3m

ruamel.yaml-0.15.20-cp27-cp27mu-manylinux1_x86_64.whl (527.3 kB view details)

Uploaded CPython 2.7mu

ruamel.yaml-0.15.20-cp27-cp27m-win_amd64.whl (183.8 kB view details)

Uploaded CPython 2.7mWindows x86-64

ruamel.yaml-0.15.20-cp27-cp27m-win32.whl (172.1 kB view details)

Uploaded CPython 2.7mWindows x86

ruamel.yaml-0.15.20-cp27-cp27m-manylinux1_x86_64.whl (527.3 kB view details)

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for ruamel.yaml-0.15.20.tar.gz
Algorithm Hash digest
SHA256 0651d8939000f323ffa9e52d4d3900e7cb73db5bf47bf06df591c75195156c77
MD5 37d26d0eed00cacd37e155b9d15cc25b
BLAKE2b-256 ec0e60d51d05485f48ed02de041620efb6eba4c8fe19fd67cc348dd5ab339a0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7de16ef1d4f09c5d2cf6244583f8c024d47c9e01fed3d62032489a0d3a63c353
MD5 ef9fa80ec3248e0d781295f63dc11dbe
BLAKE2b-256 d12968f2472e1b408ff4b0bab3150518727b7058851d3e4f3b94ad6c22a701a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f29dfbb19aa677ec2887251aa0beeb7ab927df2607ee00349d21f4b582f53903
MD5 547781392944668784c473d84505dabd
BLAKE2b-256 106ba0418513617ad8ca4a87aaea7c1c0d0bab46f6eda8e402cf54d3b4f5d3fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c8c8047d6bf22b5f3b259d66e7fe7effe5d7ef6f6a1b37e48997a9511c333a47
MD5 bf7c821ce829bb02785d6f6bee0c04ca
BLAKE2b-256 3b84c20a18af3ac1f573d5587d9151a056658d141087c8db8ba56433db6b7673

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 f7cbaac0db07043522e01e2a9a4b51fcff8594c78ce3a84fe26d5b9fece538b1
MD5 a8be0841d6e844a87d9e0623bc201061
BLAKE2b-256 b27cf148b6318042861babf426752ae676fd93317bf68df0ca68539587718384

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 aa0be30c4870639fd938de381dcb6093d540d64506b73231295642487210fc34
MD5 d46d75cf63109e40e60f0e08ad659561
BLAKE2b-256 78a253cce908b3202b75f714da9051cfd8a8fec7764fe0bb25e0a42178590445

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ea82c511ca253f22f7a51862cad419468f89a127fc5486561f690fe3318f8205
MD5 77b43ebf51f74c0bb30da3a564195a2f
BLAKE2b-256 734de1465353b0f774d0efd213d5fe4e98150f150c7ad594996c5e1ad6ee1eb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 d04919c34a7019bd0dc582df8715bc31291ed7f0740b4a56e523a9afad6e95c6
MD5 b30e7203ad2093a16386bf7789907bd0
BLAKE2b-256 551a823f65a6f4870942f974e024dca31ebf56d049aa79b612dbcfc665d2bb4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 e7cba05557cbcefe4b646860f85ff42bccff49d90a37d4c9fa56ec658dc5d9bd
MD5 88078983859b6f3987d0b1c5c1aac3f5
BLAKE2b-256 413678a31e964882e88c0850b4d09e4a0a6789e1071ee9f093a044f795022bdb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e6c40e329f180a7551d3ba3ca6414e38d3a6bfd276e7e39e631ed79f2499c8b0
MD5 e0aa38f75fd7749aa04a18edeb0afddd
BLAKE2b-256 cfd7d201f6dd9871013c3028870ae8209891bb4f276cb68343490afd09b4d96e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 3bef6ef86128a880a40a1b2587f0c27bc21beade6023abdf2504317e3be4f9fe
MD5 a893e40ca7b2a746116784e0a2093618
BLAKE2b-256 8e416055ba1e2dc128773370424d8ad0e8e96eb693a7e9f0c64e7e440ec110c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 8df20c185722c84293662d06e613dcb5cdf27381bad85ccfbb6ab108a81efaf1
MD5 16c036a48627c61ebc21817e9c538424
BLAKE2b-256 31cc7c4a91d69348dac5c88aa5dc740af7176ae880d03a0b4853a59406305683

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 387e873144f370e90a981b9a6ef8b68b7344e52247cff60af6ca2839f2e20bfc
MD5 59863602465505b4c82d7fa7b0029e52
BLAKE2b-256 0548ebdfed6dd13500dc73a4e2f541320d500d8067b50892d0a8675b9f0cc8ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 667b168fb1e7497ed45c9d9f31d3921b0c79e38edf78c9f58196eefd2e465ef7
MD5 259af2fb77f5da8f543104c800577db2
BLAKE2b-256 9107e832511aab3d453d7040e04c9233e471ca1a1a999ded22e22681010e4b54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 492f89279df6df6b6113c55fc7106f63fa95d8c08ea15c1f3192dfb48261764a
MD5 3d856f97b74d0f078f3b6f0a8f9ea34d
BLAKE2b-256 b200bf9b2f6788afaea9240645b132bf5c43fa31b8fb594c8b954fb0ffcb0467

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 71eeb66a3853caf53c8779538dc0ad9657f81cfe4b88771609a3f4fd40cb2273
MD5 593d76e3594cc0c3041928bdd2f3f302
BLAKE2b-256 c35eb75a4c62c679a70246ae78441bea584606a99f369b8c7cb2d2252abfe784

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.20-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3a53471873656cb40a9c5a1945f141903abf1b9b1b7feaa54adfada86e20e493
MD5 4bfbd6e5e5977d43562d3707b0072a43
BLAKE2b-256 0969eab318d9d977938243928c6a7e7f8820c25511d193493450c2f931bcdcb7

See more details on using hashes here.

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