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

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.22.tar.gz (253.2 kB view details)

Uploaded Source

Built Distributions

ruamel.yaml-0.15.22-cp36-cp36m-win_amd64.whl (180.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

ruamel.yaml-0.15.22-cp36-cp36m-win32.whl (166.2 kB view details)

Uploaded CPython 3.6m Windows x86

ruamel.yaml-0.15.22-cp36-cp36m-manylinux1_x86_64.whl (551.2 kB view details)

Uploaded CPython 3.6m

ruamel.yaml-0.15.22-cp35-cp35m-win_amd64.whl (180.4 kB view details)

Uploaded CPython 3.5m Windows x86-64

ruamel.yaml-0.15.22-cp35-cp35m-win32.whl (166.2 kB view details)

Uploaded CPython 3.5m Windows x86

ruamel.yaml-0.15.22-cp35-cp35m-manylinux1_x86_64.whl (551.0 kB view details)

Uploaded CPython 3.5m

ruamel.yaml-0.15.22-cp34-cp34m-win_amd64.whl (183.3 kB view details)

Uploaded CPython 3.4m Windows x86-64

ruamel.yaml-0.15.22-cp34-cp34m-win32.whl (172.4 kB view details)

Uploaded CPython 3.4m Windows x86

ruamel.yaml-0.15.22-cp34-cp34m-manylinux1_x86_64.whl (557.5 kB view details)

Uploaded CPython 3.4m

ruamel.yaml-0.15.22-cp33-cp33m-win_amd64.whl (183.1 kB view details)

Uploaded CPython 3.3m Windows x86-64

ruamel.yaml-0.15.22-cp33-cp33m-win32.whl (172.4 kB view details)

Uploaded CPython 3.3m Windows x86

ruamel.yaml-0.15.22-cp33-cp33m-manylinux1_x86_64.whl (531.7 kB view details)

Uploaded CPython 3.3m

ruamel.yaml-0.15.22-cp27-cp27mu-manylinux1_x86_64.whl (527.5 kB view details)

Uploaded CPython 2.7mu

ruamel.yaml-0.15.22-cp27-cp27m-win_amd64.whl (184.1 kB view details)

Uploaded CPython 2.7m Windows x86-64

ruamel.yaml-0.15.22-cp27-cp27m-win32.whl (172.3 kB view details)

Uploaded CPython 2.7m Windows x86

ruamel.yaml-0.15.22-cp27-cp27m-manylinux1_x86_64.whl (527.5 kB view details)

Uploaded CPython 2.7m

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22.tar.gz
Algorithm Hash digest
SHA256 c7754abb5face9ccb52308cb9c42f96c37af74ba2bf074d69c7895c5e2357744
MD5 f2793b52eec7e9a806ffdf14e9ef0a5c
BLAKE2b-256 c476dbc424830f9750160735dee7304475106d1453dbfaab6eae050e687d74c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e6668f24f74e9988dfeae90d4a1fe8bdbf1f83524504bdf636e5a30ad4cce37b
MD5 ef7a408f9b5e5e34fc74fe2227da57df
BLAKE2b-256 9b5bdf7bd984dea821a036e9b79a8889c6aa0daf716bd15412dadca708a3302f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 d109fd835cf6761095c1c1459af97ad0e5505169fefb194eda17b9e14e906ad5
MD5 f68fae2b012e9ff494dee3f5c501c34e
BLAKE2b-256 bde5dee6474aba7e2e91ee54a52c364b74af8a3d97866aee8ca3818678eb305c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6c7aced30194c3875145cb634b4243307a60b7faf7518059238b2253d2fe2c0e
MD5 3b1e48bfee362b0a0b41bd0b631eabc6
BLAKE2b-256 2af4b5b9bf74a0c0c1f51b2297fdfb1dbfa9f0a618a0af266e0935c1ca25becd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 dd8ff8b5e01d3f77308c9b4b03eb51941aca51389eb04da27a40ad87d334d637
MD5 7d1020ace40e86b49ad59e043dd96c21
BLAKE2b-256 51f668acfcbe247368f25bfa30ee71f44943d7da9992a264c72a44cc346b9299

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 2219a617f87885de9726b387235f4f2e5dfaca85d1e35704ddf15c628a431a2a
MD5 6de98f5df19bee740178b2588d9766ca
BLAKE2b-256 fc8bc50d66eab228f5e676261942fb4dbb34494ce405955e95e6961d2033e6f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 63247356595fdecc27f2fc517e370d1f2a911fbc58ca544ee93f13337311d017
MD5 72f2974e705157e827cb7fe001e440b7
BLAKE2b-256 b9c6698d770ea31e6777d842d0ff5f3fd8f5be6eaefb088eb2b204cacee5266d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 befc64699e246cb8959b299d9f3bfdf53fd6d186345560ed0f03fede684fb125
MD5 536a1fb92c2ba22192ade2457b60aa64
BLAKE2b-256 3cfc95cab8a726c4b9ee0905bb2278844a69fffdb9b1d7d168e35c9fa48cddc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 f8ecd14b2f84aa5453dad6280e7a4b0198477ceb1afb6be6ad7cd8d856133e6a
MD5 22c00154ffac79211109b4b58921a901
BLAKE2b-256 00648d2c81a5fc45aa3389ce50b71206b93505f3424e4ce336e07d9a5e1593bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f1b4353763d34d6c5e758fd3a55a5bff66963c1d2cc0e355e51c94250cf14eaa
MD5 ec4bebe04863bda5818de4d9fd089b9f
BLAKE2b-256 01023725bf43295bdc02fa497fcbade3fe6341ff33a327a1200784e111945799

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 87b12900cf17750b2303abafd3ce24e301ec85f4d7e6ea6e7173972485ddd021
MD5 e1e474a08966292558c3336f74280aca
BLAKE2b-256 a838fd444d6f1e1aa89dec23d4ab51b96e543e55e6fd3998958ddec5fda1fd5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 636231c8014503c3acabb8e2fa9adeb1d3e2a820ff8d2b4977762935731dabef
MD5 2693e6b0f6376b27d94eedb48d4752fa
BLAKE2b-256 4f6af7bc877b4a73319adf4c9711844057507798cae5821106a5e48a40b85db1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9bc9a727a874bef7f264810929a4200b4a548d1223d138d12f87f233094e504a
MD5 9e7eeaad321a1497f8985f9142938199
BLAKE2b-256 ebda9512fc1488b2d9fa16eff79ff93062ef72734c429f3622ee75052c8ea424

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 136a1f53a9e860f931b11bbec2b0288b510e419fea030c8780a9ec3727a07176
MD5 8195ee87dd6178df7008704dd4f9719a
BLAKE2b-256 6e6734a82d102bbe5c53a82175b0d95d27f6f38ba6ba6b061ef4ec71df32e667

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 bc7131fa87ddff20fc09b64db4c86bfa398245a8179e7042c73f6edd2d6bfd21
MD5 9e064bf6b59cd59fd1a0fca70eb7938d
BLAKE2b-256 ffc496620abebedaac3d530dcbb3ec81f5f138b3ab3b52ce4c3a5a47c528ef14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 b185dc392187f515e2ff9c4a335231f538a4949f5119b1331ec6d7922ab7821c
MD5 eea41c64166daf2a8c88c0c3b18167e9
BLAKE2b-256 e0c36ce7e0e8a234da269f2be41478d01bd4727d8418e759647d00d74297e145

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.22-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fc798bc0f58495adfac69ce1046202008057df7a86cf1b2f8839ac67ccc78650
MD5 f61172d685c264845f9259df53aebd18
BLAKE2b-256 cf7f5e305ec3c7cd4a306a02415bbd79a666bce41d6bf15f72c4a824f56cd000

See more details on using hashes here.

Supported by

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