Skip to main content
Quarantined

This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.

parseyaml

A small, convenient wrapper around PyYAML.

Features

  • Friendly load / dump API that mirrors PyYAML's most-used functions.
  • First-class loader= and dumper= switches (default, safe, full, base).
  • File helpers: load_file, dump_file, load_path, dump_path.
  • Automatic use of LibYAML's C implementations when available.
  • Small command-line entry point: parseyaml .

A note on loaders

The default loader is yaml.Loader. According to PyYAML's documentation, yaml.Loader can be induced to construct arbitrary Python objects and is not suitable for untrusted input. Use one of the following if that matters for your use case:

  • parseyaml.safe_load(...) / loader="safe" - only basic YAML types.
  • loader="full" - full YAML, but without the known unsafe code paths.
  • loader="base" - basic types only, no tag resolution.

If you want parseyaml to be safe by default, change _LOADERS["default"] in parseyaml/core.py from yaml.Loader/CLoader to yaml.SafeLoader/CSafeLoader.

Installation

pip install parseyaml

Usage

import parseyaml

# Default loader (yaml.Loader).
data = parseyaml.load("name: Alice\nage: 30\n")

# Explicit safe loader.
data = parseyaml.safe_load("name: Alice\nage: 30\n")

# Dump to a string.
text = parseyaml.dump(data, sort_keys=False, allow_unicode=True)

# File helpers.
parseyaml.dump_file({"a": 1}, "config.yaml")
data = parseyaml.load_file("config.yaml")

# Which C extensions are available?
print(parseyaml.is_available())

License

MIT.

Metadata

Release files for parseyaml 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parseyaml 1.2.0
File Size Uploaded Provenance Actions
parseyaml-1.2.0.tar.gz 6.9 kB Without provenance Details for parseyaml-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parseyaml 1.2.0
File Interpreter ABI Platform Actions
parseyaml-1.2.0-py3-none-any.whl Python 3 none any Details for parseyaml-1.2.0-py3-none-any.whl

Total release size: 13.2 kB

Release files / parseyaml-1.2.0.tar.gz

Download URL parseyaml-1.2.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5fe6da25a8b07825af947a478e9ce783386ce9504d8870c96a9e03aa284c405e
BLAKE2b-256 checksum
How to use checksums
6ba29e013de73cccde58773a53a842aaff7d685dd05134cc08754846710fe5b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / parseyaml-1.2.0-py3-none-any.whl

Download URL parseyaml-1.2.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fe4bb1b97e5945c3d291465e32b325c3fbb0f0a50c92f9e925831296a47898d
BLAKE2b-256 checksum
How to use checksums
c9d370fc0dcf046594bd36afa695732e0312c3e98eeb27fc7e4e3b9be4a57edf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Security for parseyaml 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page