Skip to main content

Use YAML 1.3 Features in PyYAML (YAML 1.1)

Project description

Synopsis

import yaml
from yamlfuture import Loader

# Define your own anchors:
Loader.anchors = {'name': 'YAML'}
# !import relative to this:
Loader.filepath = __file__

yamlstream = """\
---
greeting: !+ |
  Hello {*name}.
  Welcome to the future!

copyright: !import [../data.yaml, /copyright/year]
"""

print(yaml.dump(yaml.load(yamlstream, Loader))

Status

This module is very ALPHA.

YAML 1.3 is still being defined. As the various features of the YAML 1.3 evolve, yamlfuture will evolve.

Use with caution for now.

Description

YAML 1.3 is bringing exciting new features to YAML (while keeping the YAML you know and love (or hate) the same).

This package lets you use the new features (or close approximations) in PyYAML now.

This is a very early release. More features and documentation coming soon.

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

pyyaml-future-0.0.6.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file pyyaml-future-0.0.6.tar.gz.

File metadata

  • Download URL: pyyaml-future-0.0.6.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for pyyaml-future-0.0.6.tar.gz
Algorithm Hash digest
SHA256 aeb6f8f2578c68927a68f56e9944a3a7b0912efa87e5a943c8d773e284b64eb0
MD5 56dfeef2f0b7461398bb885425483e4e
BLAKE2b-256 c6150630aef3d0dad37734f1e55cf5c6351a7d7f7589891d21ad5439bea9c135

See more details on using hashes here.

Supported by

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