For the complete documentation index, see llms.txt. This page is also available as Markdown.

Yaml

Introduction

The Yaml Extension includes the YamlOutputHandler to render output in pure Yaml, as well as the YamlConfigHandler that allows applications to use Yaml configuration files as a drop-in replacement of the default ConfigParserConfigHandler.

Documentation References:

API References:

Requirements

  • pyYaml

Cement 3.0.8+:

pip install cement[yaml]

Configuration

This extension does not support any application level configuration settings or meta options.

Usage

Config Handler

Output Handler

In general, you likely would not set output_handler to yaml, but rather another type of output handler that displays readable output to the end-user (ex: Mustache, Jinja2, or Tabulate). However, Cement supports overriding handlers via command line options if the Handler.Meta.overridable option is set. For example, -o yaml will trigger the framework to use the yaml output handler, overriding the default set in App.Meta.output_handler.

See the documentation on Overriding Handlers via Command Line.

Last updated