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

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

Uploaded Source

Built Distributions

ruamel.yaml-0.15.25-cp36-cp36m-win_amd64.whl (184.2 kB view details)

Uploaded CPython 3.6mWindows x86-64

ruamel.yaml-0.15.25-cp36-cp36m-win32.whl (169.9 kB view details)

Uploaded CPython 3.6mWindows x86

ruamel.yaml-0.15.25-cp36-cp36m-manylinux1_x86_64.whl (554.9 kB view details)

Uploaded CPython 3.6m

ruamel.yaml-0.15.25-cp35-cp35m-win_amd64.whl (184.2 kB view details)

Uploaded CPython 3.5mWindows x86-64

ruamel.yaml-0.15.25-cp35-cp35m-win32.whl (169.9 kB view details)

Uploaded CPython 3.5mWindows x86

ruamel.yaml-0.15.25-cp35-cp35m-manylinux1_x86_64.whl (554.8 kB view details)

Uploaded CPython 3.5m

ruamel.yaml-0.15.25-cp34-cp34m-win_amd64.whl (187.0 kB view details)

Uploaded CPython 3.4mWindows x86-64

ruamel.yaml-0.15.25-cp34-cp34m-win32.whl (176.1 kB view details)

Uploaded CPython 3.4mWindows x86

ruamel.yaml-0.15.25-cp34-cp34m-manylinux1_x86_64.whl (561.3 kB view details)

Uploaded CPython 3.4m

ruamel.yaml-0.15.25-cp33-cp33m-win_amd64.whl (186.9 kB view details)

Uploaded CPython 3.3mWindows x86-64

ruamel.yaml-0.15.25-cp33-cp33m-win32.whl (176.1 kB view details)

Uploaded CPython 3.3mWindows x86

ruamel.yaml-0.15.25-cp33-cp33m-manylinux1_x86_64.whl (535.4 kB view details)

Uploaded CPython 3.3m

ruamel.yaml-0.15.25-cp27-cp27mu-manylinux1_x86_64.whl (531.3 kB view details)

Uploaded CPython 2.7mu

ruamel.yaml-0.15.25-cp27-cp27m-win_amd64.whl (187.8 kB view details)

Uploaded CPython 2.7mWindows x86-64

ruamel.yaml-0.15.25-cp27-cp27m-win32.whl (176.1 kB view details)

Uploaded CPython 2.7mWindows x86

ruamel.yaml-0.15.25-cp27-cp27m-manylinux1_x86_64.whl (531.3 kB view details)

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for ruamel.yaml-0.15.25.tar.gz
Algorithm Hash digest
SHA256 4b03df3bd9c88ded9f08011ed079a72ca281cabe07826f414b1aed4fd10dc04d
MD5 dd87cf9c6a2616b73acd2131f7bb5073
BLAKE2b-256 9254052eeeef41be2bf440b67aca862babf65115d0d93d32282f30e49efa81a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 3a0a5aff0057b53d1eaaa02351efbc213de0ec2fb9730a24793835957bd06513
MD5 2b73917e3b4ebd2c28222a7661ca08f4
BLAKE2b-256 70870dca030cb36d3588f2d23888c577dbc1b40f0dbd3e5e31d2abd79f8352c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 2667e2547579c1078ffa5393176119af8ef52857d81125ea2548d29700635045
MD5 18cbf3b38e7ec0601e6f88eb30b9f982
BLAKE2b-256 48af9fa1bc140d6ab5120da2d5db60286cbebed1ab048accb3f8b68e51fecf06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8a76f337ad06a496af3b7f61d8d8f52cb71cb0da1e1fd3eaf06e789373c78346
MD5 640957a776fc3467cd51e776c276d749
BLAKE2b-256 ea841149bf35141e6f22f560be1c10d3754e2661733b004c791fae795c526b24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e8771d05a2283228149d8175366449c866495b6a11f35272b436e4bbd943e3a6
MD5 bd484d9730bf2b7df46e9d6e3b10898f
BLAKE2b-256 afc9921b74c162bef26894e582d46d33174726a6c9d1846b912d8b51509e67ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1047419f3bceb582ebe917e6e5fee9077d46ebf97846e7cb913e08961cf4d635
MD5 1d724f0b7209a350374b05913a09fb19
BLAKE2b-256 662ee9aa4d62a27225d1af6b2bb4058dee2be4be9fba6ae97ee3c57d9ff0a3b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 99911986a15dfbc2f6d49838f6726d26d755d5a8d90eae889129f94e6de4c1a7
MD5 da919ea6a8cfc60a546c461384ca3189
BLAKE2b-256 a14f8c46caa3708521d824c8fd4b3b466aa9a4ef6ad2ee35ad9c1323a6b8154a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 bb871d77ea171ad390f44412a0437cf278a6958758cecf3b7fb20ee405d359c6
MD5 26652a9af37a034f2ba77214a9e9d38c
BLAKE2b-256 9a5fa01d8bec568e33c99cd29c4de3b5095d346d497acd75e596968dd6bec7ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 1f4915b9dfc38fff346c8e26cf75621e4799aec7e1bcf61a6099a4e5ae807e88
MD5 ad3911f3e554144e297b2a76c752fe6b
BLAKE2b-256 4098bdcdc6c0943993d1e4a347ad3d06353f6b1817c499967a3c42927f5b93a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 43352d5ea94de4f5f227cc7bf192827b2e54feff43282c62cef2e48a5d6a2ddd
MD5 4217d51b97dc020cc3a070b3eff5121d
BLAKE2b-256 de9e22c475a6ddd9a1a936f6de8250ce5c1d84c8ea28c2f637eb65f2ad792916

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 4c297774975a8613acf7182c2aeeb959b3c6f614e345a308e5c1c0451e577590
MD5 60bd0cb30ec6345f6bf42d2e783e825e
BLAKE2b-256 69f9b4d51e1daa3b83a9627604a5900601ddebc1a447b8392da9271479c79b10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 dec2f4c492effa30f014b3231306df5ebd644e35d2777fc1cf8201885fbe628b
MD5 b0b0a8fb1f1c26019d5f086ad3b70add
BLAKE2b-256 06119f93c7c9307e9945929d624cf2a93f59b7a4ddb93d683c455a2489f8186f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cd84f80e25b60b8f446512a18b0bf7ac845cc751ab32a026183c71fa6d166939
MD5 22de5e1fbfb8309fb667a0f0d736840b
BLAKE2b-256 08f10aa8e35f3e65893ad71fd75cbe2c2c539469760da7a2b37029e9d73d3477

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c13b29b2d045f583da3572d8e7862c869b51f123785ec625caf62b9f2bc10308
MD5 f89e6377a018bbfa2c5d7069a049e486
BLAKE2b-256 d6e34ccfcb554435f040b1e0023efa6f170c791bfad35dd82fef0caa2061f65b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 c453e334b0f9449e1523b208cf4062d8c5cf6597c650b92ede5667294c9ebe06
MD5 9109091a9d91333fbbf6a1b9fad88aa8
BLAKE2b-256 7f9886b7dd1ff86b09255b1705563e7f18e990ada2f7778807161b0aa4207cc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 f0583f1ad9eca2a33613929c17490925a983c27c3f24f68bb7fcba99cc76ebea
MD5 2202c58795777cf020f9c3937f231b40
BLAKE2b-256 acb3483dd72bfdab0c531c6708b2d890da7e9b00e6dc954db3402f8e551b04e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruamel.yaml-0.15.25-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ad73aecc0a76e1171749429a220021821a8edf6e571a2ec7be25b944a5d7f1e6
MD5 f54bfac1d06f9738578111bd579ff0a0
BLAKE2b-256 8befaab1d903f407d1341a632b7fa5f3bbc6576075a157d912be9ba63d0ad472

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