Project description
YAML is a data serialization format designed for human readability
and interaction with scripting languages. PyYAML is a YAML parser
and emitter for Python.
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
support, capable extension API, and sensible error messages. PyYAML
supports standard YAML tags and provides Python-specific tags that
allow to represent an arbitrary Python object.
PyYAML is applicable for a broad range of tasks from complex
configuration files to object serialization and persistence.
Project details
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 pyyaml-6.0.2.tar.gz
.
File metadata
-
Download URL:
pyyaml-6.0.2.tar.gz - Upload date:
- Size: 130.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for pyyaml-6.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e |
|
MD5 | 9600ee49b2b4e1a0237cf4173b6dc594 |
|
BLAKE2b-256 | 54ed79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-win_amd64.whl - Upload date:
- Size: 156.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 |
|
MD5 | 5e7fb6d4db7a1d840a033fb0d5bd25a8 |
|
BLAKE2b-256 | fade02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-win32.whl - Upload date:
- Size: 140.5 kB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 |
|
MD5 | 8b103144316708c8264323358f4986f2 |
|
BLAKE2b-256 | 140de2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl - Upload date:
- Size: 751.6 kB
- Tags: CPython 3.13, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 |
|
MD5 | 611ea14c18f1731a611c5459b674f076 |
|
BLAKE2b-256 | fe0f25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl - Upload date:
- Size: 726.7 kB
- Tags: CPython 3.13, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc |
|
MD5 | b659ddc31c278b4f92389d63d2152367 |
|
BLAKE2b-256 | 2bb2e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 759.5 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 |
|
MD5 | 94ad1d18792f010d7ee76b397cdde4e4 |
|
BLAKE2b-256 | 0424b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 763.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 |
|
MD5 | a203af2ccb8ec591b7068f9f2b38063b |
|
BLAKE2b-256 | a369864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 733.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 |
|
MD5 | 8797b6910305095c16ddddd86d5d6290 |
|
BLAKE2b-256 | 7c9a337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl - Upload date:
- Size: 171.7 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 |
|
MD5 | cb573369634787294395b3ee528cb017 |
|
BLAKE2b-256 | 459f3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - Upload date:
- Size: 181.3 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba |
|
MD5 | 0de10b76ffc610e6f6c938ed5bfef30b |
|
BLAKE2b-256 | efe33af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-win_amd64.whl - Upload date:
- Size: 156.3 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 |
|
MD5 | f8adf16efee1c9cb91dea76899f20fa1 |
|
BLAKE2b-256 | 0ce84f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-win32.whl - Upload date:
- Size: 140.6 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 |
|
MD5 | 1b1bc07561015f1307eefd123e65e0d4 |
|
BLAKE2b-256 | dfd1f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl - Upload date:
- Size: 756.6 kB
- Tags: CPython 3.12, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b |
|
MD5 | e4a6fc08464cf77f60b5437e111455bc |
|
BLAKE2b-256 | c91f4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl - Upload date:
- Size: 731.2 kB
- Tags: CPython 3.12, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 |
|
MD5 | 3c22d43ad0a824303451ee5051bdccb4 |
|
BLAKE2b-256 | d400dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 767.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 |
|
MD5 | c29ea9b47325da5a1f3832659fab99e7 |
|
BLAKE2b-256 | b92b614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 766.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 |
|
MD5 | f0c0151b5b1b51f1f8016949114cd6ae |
|
BLAKE2b-256 | 950fb8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 739.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 |
|
MD5 | fa04a0ad45d8347c2ae361966d5c4591 |
|
BLAKE2b-256 | c3939916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl - Upload date:
- Size: 173.3 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 |
|
MD5 | 5dcf026c2bc76461c6352ee03fc5d629 |
|
BLAKE2b-256 | a80c38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl - Upload date:
- Size: 183.9 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab |
|
MD5 | 5b66099e220783faa4fc1f830891c763 |
|
BLAKE2b-256 | 860cc581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-win_amd64.whl - Upload date:
- Size: 162.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 |
|
MD5 | 7be8d7266ad2dabb9329ca7a04ba852f |
|
BLAKE2b-256 | ed238da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-win32.whl - Upload date:
- Size: 143.8 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 |
|
MD5 | 4fdb5bd34f305ca0827236a960c806e9 |
|
BLAKE2b-256 | 225f956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl - Upload date:
- Size: 756.6 kB
- Tags: CPython 3.11, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e |
|
MD5 | e7e9d8d4d674b74ef7b1ff51c19de8fe |
|
BLAKE2b-256 | 45730f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl - Upload date:
- Size: 735.3 kB
- Tags: CPython 3.11, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 |
|
MD5 | a6557d46b639d425eb5d659801a59a7e |
|
BLAKE2b-256 | 9b97ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 763.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 |
|
MD5 | b338b38420725dc51b1affedeb657ff6 |
|
BLAKE2b-256 | 75e42c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 764.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 |
|
MD5 | 9f05981096be8b616ebcb4829f4e6189 |
|
BLAKE2b-256 | 51166af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 736.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c |
|
MD5 | 521b2a05abef0a53f6c03f20e46995e5 |
|
BLAKE2b-256 | ad0cc804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl - Upload date:
- Size: 172.0 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee |
|
MD5 | f244a1b2a1836c26c75b181fba64269c |
|
BLAKE2b-256 | 8b62b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl - Upload date:
- Size: 184.6 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 |
|
MD5 | 095de2cfa66cf49a98ce2f16bd1cbd3f |
|
BLAKE2b-256 | f8aa7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-win_amd64.whl - Upload date:
- Size: 161.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e |
|
MD5 | d2b37a764a27aefbf81582987945b6fa |
|
BLAKE2b-256 | b5840fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-win32.whl - Upload date:
- Size: 144.1 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 |
|
MD5 | 460557fb56d719f46727f1ac50a4f9e9 |
|
BLAKE2b-256 | beaa5afe99233fb360d0ff37377145a949ae258aaab831bde4792b32650a4378 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl - Upload date:
- Size: 720.5 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 |
|
MD5 | 242460bcfc1d8ec05d024d85c2dd3934 |
|
BLAKE2b-256 | 5c208347dcabd41ef3a3cdc4f7b7a2aff3d06598c8779faa189cdbf878b626a4 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl - Upload date:
- Size: 695.8 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 |
|
MD5 | 68ca5a2d1188ce4420cdde03cf2182f7 |
|
BLAKE2b-256 | b7335504b3a9a4464893c32f118a9cc045190a91637b119a9c881da1cf6b7a72 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 751.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed |
|
MD5 | b341256695bab056f84ef2e50ba2300b |
|
BLAKE2b-256 | 6b4e1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 719.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b |
|
MD5 | 4bd9d8fde9d16c675ad1513a5744fadd |
|
BLAKE2b-256 | 4d61de363a97476e766574650d742205be468921a7b532aa2499fcd886b62530 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 718.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 |
|
MD5 | 04721bcdc202e5eec7005039fa6bf9b0 |
|
BLAKE2b-256 | 49ee14c54df452143b9ee9f0f29074d7ca5516a36edb0b4cc40c3f280131656f |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl - Upload date:
- Size: 171.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf |
|
MD5 | 9e60a518c4bba49462c472bb6ac88963 |
|
BLAKE2b-256 | c77a68bd47624dab8fd4afbfd3c48e3b79efe09098ae941de5b58abcbadff5cb |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl - Upload date:
- Size: 184.2 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 |
|
MD5 | fa7c954f22fe4209560c562a423b8a63 |
|
BLAKE2b-256 | 9b95a3fac87cb7158e231b5a6012e438c647e1a87f09f8e0d123acec8ab8bf71 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-win_amd64.whl - Upload date:
- Size: 162.3 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 |
|
MD5 | d825cd2fb6f2c45afbcba6db3b0b4acb |
|
BLAKE2b-256 | 19875124b1c1f2412bb95c59ec481eaf936cd32f0fe2a7b16b97b81c4c017a6a |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-win32.whl - Upload date:
- Size: 144.6 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 |
|
MD5 | fef89af9f06ad035ee8e2dd4db45bc6f |
|
BLAKE2b-256 | ed5e46168b1f2757f1fcd442bc3029cd8767d88a98c9c05770d8b420948743bb |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl - Upload date:
- Size: 723.6 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 |
|
MD5 | 991198dcceb3a44785974cde92b75e69 |
|
BLAKE2b-256 | 827204fcad41ca56491995076630c3ec1e834be241664c0c09a64c9a2589b507 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl - Upload date:
- Size: 699.0 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e |
|
MD5 | 3cd131ec80499bbc0fe51a74fc71a6bb |
|
BLAKE2b-256 | d7127322c1e30b9be969670b672573d45479edef72c9a0deac3bb2868f5d7469 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 737.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 |
|
MD5 | b19223a0465adabbb617000d385d23cf |
|
BLAKE2b-256 | 3d32e7bd8535d22ea2874cef6a81021ba019474ace0d13a4819c2a4bce79bd6a |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 722.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 |
|
MD5 | 233141e342f268c8d88c8f5e6599e71c |
|
BLAKE2b-256 | e96c6e1b7f40181bc4805e2e07f4abc10a88ce4648e7e95ff1abe4ae4014a9b2 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 720.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 |
|
MD5 | df92734ae2c4b5842d490f53eff6cd45 |
|
BLAKE2b-256 | 0e9a8cc68be846c972bda34f6c2a93abb644fb2476f4dcc924d52175786932c9 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl - Upload date:
- Size: 172.3 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f |
|
MD5 | be6a450f33db245cea40a72468f89241 |
|
BLAKE2b-256 | 0a026ec546cd45143fdf9840b2c6be8d875116a64076218b61d68e12548e5839 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl - Upload date:
- Size: 184.8 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d |
|
MD5 | ffc325339ac73ba2df4cff2c621ca616 |
|
BLAKE2b-256 | 65d8b7a1db13636d7fb7d4ff431593c510c8b8fca920ade06ca8ef20015493c5 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-win_amd64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-win_amd64.whl - Upload date:
- Size: 162.7 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff |
|
MD5 | 9dadaa2d3f9df8214238e5b1dfbb57c0 |
|
BLAKE2b-256 | 758aee831ad5fafa4431099aa4e078d4c8efd43cd5e48fbc774641d233b683a9 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-win32.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-win32.whl - Upload date:
- Size: 145.5 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a |
|
MD5 | 43b17346babe1206fb83138538a087a4 |
|
BLAKE2b-256 | a099a9eb0f3e710c06c5d922026f6736e920d431812ace24aae38228d0d64b04 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl - Upload date:
- Size: 800.8 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 |
|
MD5 | 575224c058d545c8c6daacda9764a3fd |
|
BLAKE2b-256 | 8cab6226d3df99900e580091bb44258fde77a8433511a86883bd4681ea19a858 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - Upload date:
- Size: 746.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 |
|
MD5 | 5fd38b7d50923d6787022d0a5ac75d21 |
|
BLAKE2b-256 | fd7f2c3697bba5d4aa5cc2afe81826d73dfae5f049458e44732c7a0938baa673 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl - Upload date:
- Size: 757.8 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d |
|
MD5 | ad1a193a57b2f706ef30145e8a0bade0 |
|
BLAKE2b-256 | 2052551c69ca1501d21c0de51ddafa8c23a0191ef296ff098e98358f69080577 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - Upload date:
- Size: 728.1 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 |
|
MD5 | f183a82b5a0b192ed910bd75dc8b954e |
|
BLAKE2b-256 | 74cc20c34d00f04d785f2028737e2e2a8254e1425102e730fee1d6396f832577 |
See more details on using hashes here.
File details
Details for the file PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
-
Download URL:
PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl - Upload date:
- Size: 183.2 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Hashes for PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a |
|
MD5 | 437180b03a45434c4cf3d5904b3c2600 |
|
BLAKE2b-256 | 74d9323a59d506f12f498c2097488d80d16f4cf965cee1791eab58b56b19f47a |
See more details on using hashes here.
Last Updated :
25 Apr, 2022
YAML is a data serialization format that enables interaction with scripts. It is generally used to create configuration files, as it prioritizes human readability, and is therefore preferred over JSON. PyYAML is a tool that parses and emits YAML for Python. It has many useful features, like an API for low-level event-based parsing and emitting and full Unicode support, etc. It supports YAML tags and some python specific tags that allow representing Python arbitrary objects. In this article, we will learn how to install PyYAML in Windows.
Prerequisites
A Windows computer with installations of:
- Python 3.5+
- PIP
Steps to Install PyYAML
To install PyYAML in Windows follow the following steps:
Step 1: Open Windows Terminal as Administrator.
Step 2: Now, in the windows terminal write the following command to check if Python 3.5 + is installed or not.
python —version
The output should be of the form: Python 3.x.y, where x > 5. If you get a different output, the correct version of Python is not installed in your system. So now you can install the latest version of Python in your system.
Step 3: Check if pip is installed or not. PIP is a tool that enables developers to install python packages (like PyYAML). Typically, PIP is automatically installed with Python. To verify if PIP is installed in the system, open the Windows Terminal with the steps mentioned prior, and type the following command:
pip —version
If the output is not of the following format:
pip x.y.z from <location>
Then, PIP is not installed on your system. So now you can install PIP in your system.
Step 4: Installing PyYAML. Open the Windows Terminal as outlined before, and type the following command:
pip install PyYAML
Verifying the installation of PyYAML
Now, open the Windows Terminal again, open the Python Shell, and try importing the PyYAML shell to verify whether the PyYAML is properly installed or not. If you import PyYAML with any error then that means PyYAML is installed properly in your system.
python
>>> import yaml
PyYAML Documentation
PyYAML is a YAML parser and emitter for Python.
Installation
Simple install:
pip install pyyaml
To install from source, download the source package PyYAML-5.1.tar.gz and unpack it. Go to the directory PyYAML-5.1 and run:
$ python setup.py install
If you want to use LibYAML bindings, which are much faster than the pure Python version, you need to download and install LibYAML. Then you may build and install the bindings by executing
$ python setup.py --with-libyaml install
In order to use LibYAML based parser and emitter, use the classes CParser
and CEmitter
. For instance,
Note that there are some subtle (but not really significant) differences between pure Python and LibYAML based parsers and emitters.
Frequently Asked Questions
Dictionaries without nested collections are not dumped correctly
Why does
give
a: 1
b: {c: 3, d: 4}
(see #18, #24)?
It’s a correct output despite the fact that the style of the nested mapping is different.
By default, PyYAML chooses the style of a collection depending on whether it has nested collections. If a collection has nested collections, it will be assigned the block style. Otherwise it will have the flow style.
If you want collections to be always serialized in the block style, set the parameter default_flow_style
of dump()
to False
. For instance,
Python 3 support
Starting from the 3.08 release, PyYAML and LibYAML bindings provide a complete support for Python 3. This is a short outline of differences in PyYAML API between Python 2 and Python 3 versions.
In Python 2:
str
objects are converted into!!str
,!!python/str
or!binary
nodes depending on whether the object is an ASCII, UTF-8 or binary string.unicode
objects are converted into!!python/unicode
or!!str
nodes depending on whether the object is an ASCII string or not.yaml.dump(data)
produces the document as a UTF-8 encodedstr
object.yaml.dump(data, encoding=('utf-8'|'utf-16-be'|'utf-16-le'))
produces astr
object in the specified encoding.yaml.dump(data, encoding=None)
produces aunicode
object.
In Python 3:
str
objects are converted to!!str
nodes.bytes
objects are converted to!!binary
nodes.- For compatibility reasons,
!!python/str
and!python/unicode
tags are still supported and the corresponding nodes are converted tostr
objects. yaml.dump(data)
produces the document as astr
object.yaml.dump(data, encoding=('utf-8'|'utf-16-be'|'utf-16-le'))
produces abytes
object in the specified encoding.
Tutorial
Start with importing the yaml
package.
Loading YAML
Warning: It is not safe to call yaml.load
with any data received from an untrusted source! yaml.load
is as powerful as pickle.load
and so may call any Python function. Check the yaml.safe_load
function though.
The function yaml.load
converts a YAML document to a Python object.
yaml.load
accepts a byte string, a Unicode string, an open binary file object, or an open text file object. A byte string or a file must be encoded with utf-8, utf-16-be or utf-16-le encoding. yaml.load
detects the encoding by checking the BOM (byte order mark) sequence at the beginning of the string/file. If no BOM is present, the utf-8 encoding is assumed.
yaml.load
returns a Python object.
If a string or a file contains several documents, you may load them all with the yaml.load_all
function.
PyYAML allows you to construct a Python object of any type.
>>> yaml.load("""
... none: [~, null]
... bool: [true, false, on, off]
... int: 42
... float: 3.14159
... list: [LITE, RES_ACID, SUS_DEXT]
... dict: {hp: 13, sp: 5}
... """)
{'none': [None, None], 'int': 42, 'float': 3.1415899999999999,
'list': ['LITE', 'RES_ACID', 'SUS_DEXT'], 'dict': {'hp': 13, 'sp': 5},
'bool': [True, False, True, False]}
Even instances of Python classes can be constructed using the !!python/object
tag.
>>> class Hero:
... def __init__(self, name, hp, sp):
... self.name = name
... self.hp = hp
... self.sp = sp
... def __repr__(self):
... return "%s(name=%r, hp=%r, sp=%r)" % (
... self.__class__.__name__, self.name, self.hp, self.sp)
>>> yaml.load("""
... !!python/object:__main__.Hero
... name: Welthyr Syxgon
... hp: 1200
... sp: 0
... """)
Hero(name='Welthyr Syxgon', hp=1200, sp=0)
Note that the ability to construct an arbitrary Python object may be dangerous if you receive a YAML document from an untrusted source such as the Internet. The function yaml.safe_load
limits this ability to simple Python objects like integers or lists.
A python object can be marked as safe and thus be recognized by yaml.safe_load
. To do this, derive it from yaml.YAMLObject
(as explained in section Constructors, representers, resolvers) and explicitly set its class property yaml_loader
to yaml.SafeLoader
.
Dumping YAML
The yaml.dump
function accepts a Python object and produces a YAML document.
yaml.dump
accepts the second optional argument, which must be an open text or binary file. In this case, yaml.dump
will write the produced YAML document into the file. Otherwise, yaml.dump
returns the produced document.
If you need to dump several YAML documents to a single stream, use the function yaml.dump_all
. yaml.dump_all
accepts a list or a generator producing
Python objects to be serialized into a YAML document. The second optional argument is an open file.
You may even dump instances of Python classes.
>>> class Hero:
... def __init__(self, name, hp, sp):
... self.name = name
... self.hp = hp
... self.sp = sp
... def __repr__(self):
... return "%s(name=%r, hp=%r, sp=%r)" % (
... self.__class__.__name__, self.name, self.hp, self.sp)
>>> print yaml.dump(Hero("Galain Ysseleg", hp=-3, sp=2))
!!python/object:__main__.Hero {hp: -3, name: Galain Ysseleg, sp: 2}
yaml.dump
supports a number of keyword arguments that specify formatting details for the emitter. For instance, you may set the preferred intendation and width, use the canonical YAML format or force preferred style for scalars and collections.
>>> print yaml.dump(range(50))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49]
>>> print yaml.dump(range(50), width=50, indent=4)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
>>> print yaml.dump(range(5), canonical=True)
---
!!seq [
!!int "0",
!!int "1",
!!int "2",
!!int "3",
!!int "4",
]
>>> print yaml.dump(range(5), default_flow_style=False)
- 0
- 1
- 2
- 3
- 4
>>> print yaml.dump(range(5), default_flow_style=True, default_style='"')
[!!int "0", !!int "1", !!int "2", !!int "3", !!int "4"]
Constructors, representers, resolvers
You may define your own application-specific tags. The easiest way to do it is to define a subclass of yaml.YAMLObject
:
>>> class Monster(yaml.YAMLObject):
... yaml_tag = u'!Monster'
... def __init__(self, name, hp, ac, attacks):
... self.name = name
... self.hp = hp
... self.ac = ac
... self.attacks = attacks
... def __repr__(self):
... return "%s(name=%r, hp=%r, ac=%r, attacks=%r)" % (
... self.__class__.__name__, self.name, self.hp, self.ac, self.attacks)
The above definition is enough to automatically load and dump Monster
objects:
>>> yaml.load("""
... --- !Monster
... name: Cave spider
... hp: [2,6] # 2d6
... ac: 16
... attacks: [BITE, HURT]
... """)
Monster(name='Cave spider', hp=[2, 6], ac=16, attacks=['BITE', 'HURT'])
>>> print yaml.dump(Monster(
... name='Cave lizard', hp=[3,6], ac=16, attacks=['BITE','HURT']))
!Monster
ac: 16
attacks: [BITE, HURT]
hp: [3, 6]
name: Cave lizard
yaml.YAMLObject
uses metaclass magic to register a constructor, which transforms a YAML node to a class instance, and a representer, which serializes a class instance to a YAML node.
If you don’t want to use metaclasses, you may register your constructors and representers using the functions yaml.add_constructor
and yaml.add_representer
. For instance, you may want to add a constructor and a representer for the following Dice
class:
The default representation for Dice
objects is not pretty:
Suppose you want a Dice
object to represented as AdB
in YAML:
First we define a representer that converts a dice object to a scalar node with the tag !dice
, then we register it.
Now you may dump an instance of the Dice
object:
Let us add the code to construct a Dice object:
Then you may load a Dice
object as well:
You might not want to specify the tag !dice
everywhere. There is a way to teach PyYAML that any untagged plain scalar which looks like XdY has the implicit tag !dice
. Use add_implicit_resolver
:
Now you don’t have to specify the tag to define a Dice
object:
YAML syntax
A good introduction to the YAML syntax is Chapter 2 of the YAML specification.
You may also check the YAML cookbook. Note that it is focused on a Ruby implementation and uses the old YAML 1.0 syntax.
Here we present most common YAML constructs together with the corresponding Python objects.
Documents
YAML stream is a collection of zero or more documents. An empty stream contains no documents. Documents are separated with ---
. Documents may optionally end with ...
. A single document may or may not be marked with ---
.
Example of an implicit document:
Example of an explicit document:
Example of several documents in the same stream:
Block sequences
In the block context, sequence entries are denoted by -
(dash then space):
Block sequences can be nested:
It’s not necessary to start a nested sequence with a new line:
A block sequence may be nested to a block mapping. Note that in this case it is not necessary to indent the sequence.
Block mappings
In the block context, keys and values of mappings are separated by :
(colon then space):
Complex keys are denoted with ?
(question mark then space):
Block mapping can be nested:
A block mapping may be nested in a block sequence:
Flow collections
The syntax of flow collections in YAML is very close to the syntax of list and dictionary constructors in Python:
# YAML
{ str: [15, 17], con: [16, 16], dex: [17, 18], wis: [16, 16], int: [10, 13], chr: [5, 8] }
# Python
{'dex': [17, 18], 'int': [10, 13], 'chr': [5, 8], 'wis': [16, 16], 'str': [15, 17], 'con': [16, 16]}
Scalars
There are 5 styles of scalars in YAML: plain, single-quoted, double-quoted, literal, and folded:
Each style has its own quirks. A plain scalar does not use indicators to denote its start and end, therefore it’s the most restricted style. Its natural applications are names of attributes and parameters.
Using single-quoted scalars, you may express any value that does not contain special characters. No escaping occurs for single quoted scalars except that a pair of adjacent quotes ''
is replaced with a lone single quote '
.
Double-quoted is the most powerful style and the only style that can express any scalar value. Double-quoted scalars allow escaping. Using escaping sequences \x*
and \u***
, you may express any ASCII or Unicode character.
There are two kind of block scalar styles: literal and folded. The literal style is the most suitable style for large block of text such as source code. The folded style is similar to the literal style, but two adjacent non-empty lines are joined to a single line separated by a space character.
Aliases
Note that PyYAML does not yet support recursive objects.
Using YAML you may represent objects of arbitrary graph-like structures. If you want to refer to the same object from different parts of a document, you need to use anchors and aliases.
Anchors are denoted by the &
indicator while aliases are denoted by «. For instance, the document
expresses the idea of a hero holding a heavy sword in both hands.
PyYAML now fully supports recursive objects. For instance, the document
will produce a list object containing a reference to itself.
Tags
Tags are used to denote the type of a YAML node. Standard YAML tags are defined at http://yaml.org/type/index.html.
Tags may be implicit:
or explicit:
Plain scalars without explicitly defined tags are subject to implicit tag resolution. The scalar value is checked against a set of regular expressions and if one of them matches, the corresponding tag is assigned to the scalar. PyYAML allows an application to add custom implicit tag resolvers.
The following table describes how nodes with different tags are converted to Python objects.
YAML tag | Python type |
---|---|
Standard YAML tags | |
!!null |
None |
!!bool |
bool |
!!int |
int or long (int in Python 3) |
!!float |
float |
!!binary |
str (bytes in Python 3) |
!!timestamp |
datetime.datetime |
!!omap , !!pairs |
list of pairs |
!!set |
set |
!!str |
str or unicode (str in Python 3) |
!!seq |
list |
!!map |
dict |
Python-specific tags | |
!!python/none |
None |
!!python/bool |
bool |
!!python/bytes |
(bytes in Python 3) |
!!python/str |
str (str in Python 3) |
!!python/unicode |
unicode (str in Python 3) |
!!python/int |
int |
!!python/long |
long (int in Python 3) |
!!python/float |
float |
!!python/complex |
complex |
!!python/list |
list |
!!python/tuple |
tuple |
!!python/dict |
dict |
Complex Python tags | |
!!python/name:module.name |
module.name |
!!python/module:package.module |
package.module |
!!python/object:module.cls |
module.cls instance |
!!python/object/new:module.cls |
module.cls instance |
!!python/object/apply:module.f |
value of f(...) |
String conversion (Python 2 only)
There are four tags that are converted to str
and unicode
values: !!str
, !!binary
, !!python/str
, and !!python/unicode
.
!!str
-tagged scalars are converted to str
objects if its value is ASCII. Otherwise it is converted to unicode
. !!binary
-tagged scalars are converted to str
objects with its value decoded using the base64 encoding. !!python/str
scalars are converted to str
objects encoded with utf-8 encoding. !!python/unicode
scalars are converted to unicode
objects.
Conversely, a str
object is converted to 1. a !!str
scalar if its value is ASCII. 2. a !!python/str
scalar if its value is a correct utf-8 sequence. 3. a !!binary
scalar otherwise.
A unicode
object is converted to 1. a !!python/unicode
scalar if its value is ASCII. 2. a !!str
scalar otherwise.
String conversion (Python 3 only)
In Python 3, str
objects are converted to !!str
scalars and bytes
objects to !!binary
scalars. For compatibility reasons, tags !!python/str
and !!python/unicode
are still supported and converted to str
objects.
Names and modules
In order to represent static Python objects like functions or classes, you need to use a complex !!python/name
tag. For instance, the function yaml.dump
can be represented as
Similarly, modules are represented using the tag !python/module
:
Objects
Any pickleable object can be serialized using the !!python/object
tag:
In order to support the pickle protocol, two additional forms of the !!python/object
tag are provided:
If only the args
field is non-empty, the above records can be shortened:
Reference
Warning: API stability is not guaranteed!
The yaml package
scan(stream)
scans the given stream
and produces a sequence of tokens.
parse(stream)
parses the given stream
and produces a sequence of parsing events.
emit(events, stream=None)
serializes the given sequence of parsing events
and writes them to the stream
. if stream
is None
, it returns the produced stream.
compose(stream, Loader=Loader)
compose_all(stream, Loader=Loader)
serialize(node, stream=None, Dumper=Dumper,
encoding='utf-8', # encoding=None (Python 3)
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None)
serialize_all(nodes, stream=None, Dumper=Dumper, ...)
compose(stream)
parses the given stream
and returns the root of the representation graph for the first document in the stream. If there are no documents in the stream, it returns None
.
compose_all(stream)
parses the given stream
and returns a sequence of representation graphs corresponding to the documents in the stream.
serialize(node, stream=None)
serializes the given representation graph into the stream
. If stream
is None
, it returns the produced stream.
serialize_all(node, stream=None)
serializes the given sequence of representation graphs into the given stream
. If stream
is None
, it returns the produced stream.
load(stream, Loader=Loader)
load_all(stream, Loader=Loader)
safe_load(stream)
safe_load_all(stream)
dump(data, stream=None, Dumper=Dumper,
default_style=None,
default_flow_style=None,
encoding='utf-8', # encoding=None (Python 3)
explicit_start=None,
explicit_end=None,
version=None,
tags=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None)
dump_all(data, stream=None, Dumper=Dumper, ...)
safe_dump(data, stream=None, ...)
safe_dump_all(data, stream=None, ...)
load(stream)
parses the given stream
and returns a Python object constructed from for the first document in the stream. If there are no documents in the stream, it returns None
.
load_all(stream)
parses the given stream
and returns a sequence of Python objects corresponding to the documents in the stream.
safe_load(stream)
parses the given stream
and returns a Python object constructed from for the first document in the stream. If there are no documents in the stream, it returns None
. safe_load
recognizes only standard YAML tags and cannot construct an arbitrary Python object.
A python object can be marked as safe and thus be recognized by yaml.safe_load
. To do this, derive it from yaml.YAMLObject
(as explained in section Constructors, representers, resolvers) and explicitly set its class property yaml_loader
to yaml.SafeLoader
.
safe_load_all(stream)
parses the given stream
and returns a sequence of Python objects corresponding to the documents in the stream. safe_load_all
recognizes only standard YAML tags and cannot construct an arbitrary Python object.
dump(data, stream=None)
serializes the given Python object into the stream
. If stream
is None
, it returns the produced stream.
dump_all(data, stream=None)
serializes the given sequence of Python objects into the given stream
. If stream
is None
, it returns the produced stream. Each object is represented as a YAML document.
safe_dump(data, stream=None)
serializes the given Python object into the stream
. If stream
is None
, it returns the produced stream. safe_dump
produces only standard YAML tags and cannot represent an arbitrary Python object.
safe_dump_all(data, stream=None)
serializes the given sequence of Python objects into the given stream
. If stream
is None
, it returns the produced stream. Each object is represented as a YAML document. safe_dump_all
produces only standard YAML tags and cannot represent an arbitrary Python object.
add_constructor(tag, constructor)
specifies a constructor
for the given tag
. A constructor is a function that converts a node of a YAML representation graph to a native Python object. A constructor accepts an instance of Loader
and a node and returns a Python object.
add_multi_constructor(tag_prefix, multi_constructor)
specifies a multi_constructor
for the given tag_prefix
. A multi-constructor is a function that converts a node of a YAML representation graph to a native Python object. A multi-constructor accepts an instance of Loader
, the suffix of the node tag, and a node and returns a Python object.
add_representer(data_type, representer)
specifies a representer
for Python objects of the given data_type
. A representer is a function that converts a native Python object to a node of a YAML representation graph. A representer accepts an instance of Dumper
and an object and returns a node.
add_multi_representer(base_data_type, multi_representer)
specifies a multi_representer
for Python objects of the given base_data_type
or any of its subclasses. A multi-representer is a function that converts a native Python object to a node of a YAML representation graph. A multi-representer accepts an instance of Dumper
and an object and returns a node.
add_implicit_resolver(tag, regexp, first)
adds an implicit tag resolver for plain scalars. If the scalar value is matched the given regexp
, it is assigned the tag
. first
is a list of possible initial characters or None
.
add_path_resolver(tag, path, kind)
adds a path-based implicit tag resolver. A path
is a list of keys that form a path to a node in the representation graph. Paths elements can be string values, integers, or None
. The kind
of a node can be str
, list
, dict
, or None
.
Mark
An instance of Mark
points to a certain position in the input stream. name
is the name of the stream, for instance it may be the filename if the input stream is a file. line
and column
is the line and column of the position (starting from 0). buffer
, when it is not None
, is a part of the input stream that contain the position and pointer
refers to the position in the buffer
.
YAMLError
If the YAML parser encounters an error condition, it raises an exception which is an instance of YAMLError
or of its subclass. An application may catch this exception and warn a user.
An exception produced by the YAML processor may point to the problematic position.
Tokens
Tokens are produced by a YAML scanner. They are not really useful except for low-level YAML applications such as syntax highlighting.
The PyYAML scanner produces the following types of tokens:
StreamStartToken(encoding, start_mark, end_mark) # Start of the stream.
StreamEndToken(start_mark, end_mark) # End of the stream.
DirectiveToken(name, value, start_mark, end_mark) # YAML directive, either %YAML or %TAG.
DocumentStartToken(start_mark, end_mark) # '---'.
DocumentEndToken(start_mark, end_mark) # '...'.
BlockSequenceStartToken(start_mark, end_mark) # Start of a new block sequence.
BlockMappingStartToken(start_mark, end_mark) # Start of a new block mapping.
BlockEndToken(start_mark, end_mark) # End of a block collection.
FlowSequenceStartToken(start_mark, end_mark) # '['.
FlowMappingStartToken(start_mark, end_mark) # '{'.
FlowSequenceEndToken(start_mark, end_mark) # ']'.
FlowMappingEndToken(start_mark, end_mark) # '}'.
KeyToken(start_mark, end_mark) # Either '?' or start of a simple key.
ValueToken(start_mark, end_mark) # ':'.
BlockEntryToken(start_mark, end_mark) # '-'.
FlowEntryToken(start_mark, end_mark) # ','.
AliasToken(value, start_mark, end_mark) # '*value'.
AnchorToken(value, start_mark, end_mark) # '&value'.
TagToken(value, start_mark, end_mark) # '!value'.
ScalarToken(value, plain, style, start_mark, end_mark) # 'value'.
start_mark
and end_mark
denote the beginning and the end of a token.
Example:
>>> document = """
... ---
... block sequence:
... - BlockEntryToken
... block mapping:
... ? KeyToken
... : ValueToken
... flow sequence: [FlowEntryToken, FlowEntryToken]
... flow mapping: {KeyToken: ValueToken}
... anchors and tags:
... - &A !!int '5'
... - *A
... ...
... """
>>> for token in yaml.scan(document):
... print token
StreamStartToken(encoding='utf-8')
DocumentStartToken()
BlockMappingStartToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'block sequence')
ValueToken()
BlockEntryToken()
ScalarToken(plain=True, style=None, value=u'BlockEntryToken')
KeyToken()
ScalarToken(plain=True, style=None, value=u'block mapping')
ValueToken()
BlockMappingStartToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'KeyToken')
ValueToken()
ScalarToken(plain=True, style=None, value=u'ValueToken')
BlockEndToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'flow sequence')
ValueToken()
FlowSequenceStartToken()
ScalarToken(plain=True, style=None, value=u'FlowEntryToken')
FlowEntryToken()
ScalarToken(plain=True, style=None, value=u'FlowEntryToken')
FlowSequenceEndToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'flow mapping')
ValueToken()
FlowMappingStartToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'KeyToken')
ValueToken()
ScalarToken(plain=True, style=None, value=u'ValueToken')
FlowMappingEndToken()
KeyToken()
ScalarToken(plain=True, style=None, value=u'anchors and tags')
ValueToken()
BlockEntryToken()
AnchorToken(value=u'A')
TagToken(value=(u'!!', u'int'))
ScalarToken(plain=False, style="'", value=u'5')
BlockEntryToken()
AliasToken(value=u'A')
BlockEndToken()
DocumentEndToken()
StreamEndToken()
Events
Events are used by the low-level Parser and Emitter interfaces, which are similar to the SAX API. While the Parser parses a YAML stream and produces a sequence of events, the Emitter accepts a sequence of events and emits a YAML stream.
The following events are defined:
StreamStartEvent(encoding, start_mark, end_mark)
StreamEndEvent(start_mark, end_mark)
DocumentStartEvent(explicit, version, tags, start_mark, end_mark)
DocumentEndEvent(start_mark, end_mark)
SequenceStartEvent(anchor, tag, implicit, flow_style, start_mark, end_mark)
SequenceEndEvent(start_mark, end_mark)
MappingStartEvent(anchor, tag, implicit, flow_style, start_mark, end_mark)
MappingEndEvent(start_mark, end_mark)
AliasEvent(anchor, start_mark, end_mark)
ScalarEvent(anchor, tag, implicit, value, style, start_mark, end_mark)
The flow_style
flag indicates if a collection is block or flow. The possible values are None
, True
, False
. The style
flag of a scalar event indicates the style of the scalar. Possible values are None
, _
, '\_
, '"'
, '|'
, '>'
. The implicit
flag of a collection start event indicates if the tag may be omitted when the collection is emitted. The implicit
flag of a scalar event is a pair of boolean values that indicate if the tag may be omitted when the scalar is emitted in a plain and non-plain style correspondingly.
Example:
>>> document = """
... scalar: &A !!int '5'
... alias: *A
... sequence: [1, 2, 3]
... mapping: [1: one, 2: two, 3: three]
... """
>>> for event in yaml.parse(document):
... print event
StreamStartEvent()
DocumentStartEvent()
MappingStartEvent(anchor=None, tag=None, implicit=True)
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'scalar')
ScalarEvent(anchor=u'A', tag=u'tag:yaml.org,2002:int', implicit=(False, False), value=u'5')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'alias')
AliasEvent(anchor=u'A')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'sequence')
SequenceStartEvent(anchor=None, tag=None, implicit=True)
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'1')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'2')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'3')
SequenceEndEvent()
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'mapping')
MappingStartEvent(anchor=None, tag=None, implicit=True)
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'1')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'one')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'2')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'two')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'3')
ScalarEvent(anchor=None, tag=None, implicit=(True, False), value=u'three')
MappingEndEvent()
MappingEndEvent()
DocumentEndEvent()
StreamEndEvent()
>>> print yaml.emit([
... yaml.StreamStartEvent(encoding='utf-8'),
... yaml.DocumentStartEvent(explicit=True),
... yaml.MappingStartEvent(anchor=None, tag=u'tag:yaml.org,2002:map', implicit=True, flow_style=False),
... yaml.ScalarEvent(anchor=None, tag=u'tag:yaml.org,2002:str', implicit=(True, True), value=u'agile languages'),
... yaml.SequenceStartEvent(anchor=None, tag=u'tag:yaml.org,2002:seq', implicit=True, flow_style=True),
... yaml.ScalarEvent(anchor=None, tag=u'tag:yaml.org,2002:str', implicit=(True, True), value=u'Python'),
... yaml.ScalarEvent(anchor=None, tag=u'tag:yaml.org,2002:str', implicit=(True, True), value=u'Perl'),
... yaml.ScalarEvent(anchor=None, tag=u'tag:yaml.org,2002:str', implicit=(True, True), value=u'Ruby'),
... yaml.SequenceEndEvent(),
... yaml.MappingEndEvent(),
... yaml.DocumentEndEvent(explicit=True),
... yaml.StreamEndEvent(),
... ])
---
agile languages: [Python, Perl, Ruby]
...
Nodes
Nodes are entities in the YAML informational model. There are three kinds of nodes: scalar, sequence, and mapping. In PyYAML, nodes are produced by Composer and can be serialized to a YAML stream by Serializer.
ScalarNode(tag, value, style, start_mark, end_mark)
SequenceNode(tag, value, flow_style, start_mark, end_mark)
MappingNode(tag, value, flow_style, start_mark, end_mark)
The style
and flow_style
flags have the same meaning as for events. The value of a scalar node must be a unicode string. The value of a sequence node is a list of nodes. The value of a mapping node is a list of pairs consisting of key and value nodes.
Example:
>>> print yaml.compose("""
... kinds:
... - scalar
... - sequence
... - mapping
... """)
MappingNode(tag=u'tag:yaml.org,2002:map', value=[
(ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'kinds'), SequenceNode(tag=u'tag:yaml.org,2002:seq', value=[
ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'scalar'),
ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'sequence'),
ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'mapping')]))])
>>> print yaml.serialize(yaml.SequenceNode(tag=u'tag:yaml.org,2002:seq', value=[
... yaml.ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'scalar'),
... yaml.ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'sequence'),
... yaml.ScalarNode(tag=u'tag:yaml.org,2002:str', value=u'mapping')]))
- scalar
- sequence
- mapping
Loader
Loader(stream)
is the most common of the above classes and should be used in most cases. stream
is an input YAML stream. It can be a string, a Unicode string, an open file, an open Unicode file.
Loader
supports all predefined tags and may construct an arbitrary Python object. Therefore it is not safe to use Loader
to load a document received from an untrusted source. By default, the functions scan
, parse
, compose
, construct
, and others use Loader
.
SafeLoader(stream)
supports only standard YAML tags and thus it does not construct class instances and probably safe to use with documents received from an untrusted source. The functions safe_load
and safe_load_all
use SafeLoader
to parse a stream.
BaseLoader(stream)
does not resolve or support any tags and construct only basic Python objects: lists, dictionaries and Unicode strings.
CLoader
, CSafeLoader
, CBaseLoader
are versions of the above classes written in C using the LibYAML library.
Loader.check_token(*TokenClasses)
returns True
if the next token in the stream is an instance of one of the given TokenClasses
. Otherwise it returns False
.
Loader.peek_token()
returns the next token in the stream, but does not remove it from the internal token queue. The function returns None
at the end of the stream.
Loader.get_token()
returns the next token in the stream and removes it from the internal token queue. The function returns None
at the end of the stream.
Loader.check_event(*EventClasses)
returns True
if the next event in the stream is an instance of one of the given EventClasses
. Otherwise it returns False
.
Loader.peek_event()
returns the next event in the stream, but does not remove it from the internal event queue. The function returns None
at the end of the stream.
Loader.get_event()
returns the next event in the stream and removes it from the internal event queue. The function returns None
at the end of the stream.
Loader.check_node()
returns True
is there are more documents available in the stream. Otherwise it returns False
.
Loader.get_node()
construct the representation graph of the next document in the stream and returns its root node.
Loader.check_data()
returns True
is there are more documents available in the stream. Otherwise it returns False
.
Loader.get_data()
constructs and returns a Python object corresponding to the next document in the stream.
Loader.add_constructor(tag, constructor)
: see add_constructor
.
Loader.add_multi_constructor(tag_prefix, multi_constructor)
: see add_multi_constructor
.
Loader.construct_scalar(node)
checks that the given node
is a scalar and returns its value. This function is intended to be used in constructors.
Loader.construct_sequence(node)
checks that the given node
is a sequence and returns a list of Python objects corresponding to the node items. This function is intended to be used in constructors.
Loader.construct_mapping(node)
checks that the given node
is a mapping and returns a dictionary of Python objects corresponding to the node keys and values. This function is intended to be used in constructors.
Loader.add_implicit_resolver(tag, regexp, first)
: see add_implicit_resolver
.
Loader.add_path_resolver(tag, path, kind)
: see add_path_resolver
.
Dumper
Dumper(stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=None,
tags=None)
SafeDumper(stream, ...)
BaseDumper(stream, ...)
# The following classes are available only if you build LibYAML bindings.
CDumper(stream, ...)
CSafeDumper(stream, ...)
CBaseDumper(stream, ...)
Dumper(stream)
is the most common of the above classes and should be used in most cases. stream
is an output YAML stream. It can be an open file or an open Unicode file.
Dumper
supports all predefined tags and may represent an arbitrary Python object. Therefore it may produce a document that cannot be loaded by other YAML processors. By default, the functions emit
, serialize
, dump
, and others use Dumper
.
SafeDumper(stream)
produces only standard YAML tags and thus cannot represent class instances and probably more compatible with other YAML processors. The functions safe_dump
and safe_dump_all
use SafeDumper
to produce a YAML document.
BaseDumper(stream)
does not support any tags and is useful only for subclassing.
CDumper
, CSafeDumper
, CBaseDumper
are versions of the above classes written in C using the LibYAML library.
Dumper.emit(event)
serializes the given event
and writes it to the output stream.
Dumper.open()
emits StreamStartEvent
.
Dumper.serialize(node)
serializes the given representation graph into the output stream.
Dumper.close()
emits StreamEndEvent
.
Dumper.represent(data)
serializes the given Python object to the output YAML stream.
Dumper.add_representer(data_type, representer)
: see add_representer
.
Dumper.add_multi_representer(base_data_type, multi_representer)
: see add_multi_representer
.
Dumper.represent_scalar(tag, value, style=None)
returns a scalar node with the given tag
, value
, and style
. This function is intended to be used in representers.
Dumper.represent_sequence(tag, sequence, flow_style=None)
return a sequence node with the given tag
and subnodes generated from the items of the given sequence
.
Dumper.represent_mapping(tag, mapping, flow_style=None)
return a mapping node with the given tag
and subnodes generated from the keys and values of the given mapping
.
Dumper.add_implicit_resolver(tag, regexp, first)
: see add_implicit_resolver
.
Dumper.add_path_resolver(tag, path, kind)
: see add_path_resolver
.
YAMLObject
Subclassing YAMLObject
is an easy way to define tags, constructors, and representers for your classes. You only need to override the yaml_tag
attribute. If you want to define your custom constructor and representer, redefine the from_yaml
and to_yaml
method correspondingly.
Deviations from the specification
need to update this section
- rules for tabs in YAML are confusing. We are close, but not there yet. Perhaps both the spec and the parser should be fixed. Anyway, the best rule for tabs in YAML is to not use them at all.
- Byte order mark. The initial BOM is stripped, but BOMs inside the stream are considered as parts of the content. It can be fixed, but it’s not really important now.
- Empty plain scalars are not allowed if alias or tag is specified. This is done to prevent anomalities like [ !tag, value], which can be interpreted both as [ !<!tag,> value ] and [ !<!tag> «“,”value» ]. The spec should be fixed.
-
Indentation of flow collections. The spec requires them to be indented more than their block parent node. Unfortunately this rule renders many intuitively correct constructs invalid, for instance,
block: { } # this is indentation violation according to the spec.
-
‘:’ is not allowed for plain scalars in the flow mode. {1:2} is interpreted as { 1 : 2 }.
-
Method 1: Using pip to Install PyYAML
-
Method 2: Installing PyYAML in a Virtual Environment
-
Method 3: Installing PyYAML from Source
-
Conclusion
-
FAQ
YAML, which stands for “YAML Ain’t Markup Language,” is a human-readable data serialization standard that is often used for configuration files and data exchange between languages. In Python, working with YAML files is made easy through the PyYAML library. Whether you’re a seasoned developer or just starting your programming journey, knowing how to install and utilize YAML in Python can significantly enhance your productivity.
This tutorial will walk you through the steps to install YAML in Python, ensuring you have all the tools you need to work with this versatile format. Let’s dive right in!
Method 1: Using pip to Install PyYAML
The most straightforward way to install YAML in Python is by using pip, the package installer for Python. If you have Python already set up on your machine, pip will usually be installed alongside it. Here’s how to install the PyYAML library, which allows you to read and write YAML files effortlessly.
First, open your terminal or command prompt. Then, execute the following command:
Output:
Collecting PyYAML
Downloading PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (440 kB)
|████████████████████████████████| 440 kB 2.5 MB/s
Installing collected packages: PyYAML
Successfully installed PyYAML-5.4.1
After running this command, pip will download and install the PyYAML library. You can confirm the installation by running:
Output:
Name: PyYAML
Version: 5.4.1
Summary: YAML parser and emitter for Python
Home-page: https://pyyaml.org/
Author: Kirill Simonov
Author-email: simonov@inbox.ru
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by:
This command will display the version of PyYAML installed, along with some additional information about the package. Now that you have PyYAML installed, you can start working with YAML files in your Python projects.
Method 2: Installing PyYAML in a Virtual Environment
Using a virtual environment is a best practice in Python development. It allows you to create isolated spaces for your projects, ensuring that dependencies do not conflict. If you want to install YAML in Python while keeping your environment clean, follow these steps.
First, create a virtual environment by executing the following command in your terminal:
This command creates a new directory named myenv
, where your virtual environment will reside. Next, activate the virtual environment:
- On Windows:
- On macOS/Linux:
source myenv/bin/activate
Once activated, your terminal prompt will change, indicating that you are now working within the virtual environment. Now, you can install PyYAML using pip:
Output:
Collecting PyYAML
Downloading PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (440 kB)
|████████████████████████████████| 440 kB 2.5 MB/s
Installing collected packages: PyYAML
Successfully installed PyYAML-5.4.1
To verify the installation, run:
Output:
Name: PyYAML
Version: 5.4.1
Summary: YAML parser and emitter for Python
Home-page: https://pyyaml.org/
Author: Kirill Simonov
Author-email: simonov@inbox.ru
License: MIT
Location: /path/to/myenv/lib/python3.9/site-packages
Requires:
Required-by:
With PyYAML successfully installed in your virtual environment, you can start working with YAML files without worrying about affecting your global Python installation.
Method 3: Installing PyYAML from Source
If you prefer to install PyYAML directly from its source code, you can do so by cloning the repository from GitHub. This method is useful if you want to work with the latest development version or contribute to the project.
First, ensure you have Git installed on your machine. Then, open your terminal and run the following command to clone the PyYAML repository:
git clone https://github.com/yaml/pyyaml.git
This command will create a local copy of the PyYAML repository. Next, navigate into the cloned directory:
Now, you can install PyYAML using pip:
Output:
Processing /path/to/pyyaml
Building wheels for collected packages: PyYAML
Building wheel for PyYAML (setup.py) ... done
Created wheel for PyYAML: filename=PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl size=440000 sha256=abc123...
Successfully built PyYAML
Installing collected packages: PyYAML
Successfully installed PyYAML-5.4.1
To verify the installation, run:
Output:
Name: PyYAML
Version: 5.4.1
Summary: YAML parser and emitter for Python
Home-page: https://pyyaml.org/
Author: Kirill Simonov
Author-email: simonov@inbox.ru
License: MIT
Location: /path/to/your/venv/lib/python3.9/site-packages
Requires:
Required-by:
This method allows you to get the latest version of PyYAML directly from the source, giving you the opportunity to contribute to the project or customize it for your needs.
Conclusion
Installing YAML in Python is a straightforward process, whether you choose to use pip, set up a virtual environment, or clone the source code from GitHub. Each method offers its own advantages, allowing you to select the one that best fits your development style and project requirements. By following this guide, you’ll be well-equipped to work with YAML files in your Python applications, enhancing your data serialization capabilities. Happy coding!
FAQ
-
What is YAML?
YAML is a human-readable data serialization standard often used for configuration files and data exchange between languages. -
Why should I use PyYAML?
PyYAML simplifies the process of reading and writing YAML files in Python, making it easier to work with structured data. -
Can I use PyYAML in a virtual environment?
Yes, using a virtual environment is recommended to keep your projects organized and dependencies isolated. -
How can I check if PyYAML is installed?
You can use the command pip show PyYAML to display information about the installed package. -
Is it necessary to install PyYAML from source?
No, installing from pip is the most common and easiest method. However, installing from source allows you to work with the latest version.
Enjoying our tutorials? Subscribe to DelftStack on YouTube to support us in creating more high-quality video guides. Subscribe
Learn the steps to know the process of installing the Yaml package to use in Python3 using the PIP on Linux, Windows, or MacOS.
Step 1: Check Python VersionStep 2: Install PIP, if not availableStep 3: Install the ‘pyyaml’ PackageStep 4: Verify InstallationStep 5: Start Using the ‘yaml’ Package
‘Yaml’ is a data serialization language that stands for “YAML Ain’t Markup Language”, as compared to JSON, it offers an easily human-readable format commonly used for writing configuration files. If you want to use YAML for creating files using its syntax in Python then we need to add a package that supports it; so, that we can parse, modify, and generate YAML files in your Python applications. The good thing is we can easily install it using PIP, a popular Python package manager.
Step 1: Check Python Version
You must have Python pre-installed on your Linux or any other system you are using before planning to install any package for it. To check for that and confirm the installed version of Python you can run the following command in the terminal:
python --version
Step 2: Install PIP, if not available
Once you are assured that your system has Python, the second thing we need is its package manager called ‘PIP‘. Although Python 3 would be already on your system but PIP may not.
So to check it, first run:
pip3 --version
If you get nothing in return after running the above command then you need to install it. So, for that use the given command, if you are using Linux:
For Debian or Ubuntu-based systems.
sudo apt install python3-pip
For RHEL-based systems:
sudo dnf install python3-pip
(optional) Also, it’s a good approach, if you use virtual environments to isolate your Python projects. You can create a virtual environment using tools like virtualenv or venv to install WordCloud within that environment.
So, those who want to set up a virtual environment can follow these steps otherwise move to the next one:
Install the Virtualenv package:
sudo apt install python3-venv
Use the given command and create a new Python virtual environment:
python3 -m venv testenv
Once the virtual environment is created, to activate it run:
source testenv/bin/activate
Note: testenv is our environment name you can give something else if you want:
Step 3: Install the ‘pyyaml’ Package
Now, we have both Python and PIP on our system, let’s install a package named- ‘pyyaml’ that offers YAML functionality in Python. Run the following command.
pip3 install PyYaml
This command will download and install the ‘pyyaml’ package, which provides the ‘yaml’ functionality for Python.
(optional) Or alternatively, users can use the Python3 command as well, those who don’t want to use PIP:
For Debian systems
sudo apt install python3- yaml
For RHEL systems
sudo dnf install python3-yaml
Step 4: Verify Installation
Once the installation is completed, you can verify if the ‘yaml’ package is installed correctly. Open a Python interactive shell by running the following command in the terminal:
python
Then, import the ‘yaml’ module by typing the following command in the Python shell:
import yaml
If no errors occur, the ‘yaml’ package is installed successfully.
Step 5: Start Using the ‘yaml’ Package
Let’s say you have a YAML file named data.yaml with the following content:
name: John Doe
age: 30
occupation: Developer
Now, let’s see how you can read and modify this YAML file using the yaml
package:
import yaml
# Reading YAML File
with open('data.yaml', 'r') as file:
data = yaml.safe_load(file)
print("Original Data:")
print(data)
# Modifying Data
data['age'] = 31
data['occupation'] = 'Senior Developer'
# Writing YAML File
with open('data_updated.yaml', 'w') as file:
yaml.dump(data, file)
print("\nUpdated Data:")
print(data)
In this example, the yaml.safe_load()
function is used to load the YAML content from the file into a Python dictionary. After modifying the dictionary, the yaml.dump()
function is used to write the updated data back to a new YAML file named data_updated.yaml
.
Remember to adjust the file paths according to your project’s file structure.
Make sure you have the data.yaml
file in the same directory as your Python script for this example to work.
Other Articles:
- Use Python’s PIP to install WordCloud Library
- EasyGUI Python library Installation on Ubuntu with an example
- How to install Basemap Python Library in Ubuntu Linux
- 6 Best Python IDEs available for Ubuntu Linux for coding