Skip to main content

Use YAML 1.3 Features in PyYAML (YAML 1.1)

Project description


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


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.


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 hashes)

Uploaded Source

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