Top "Pyyaml" questions

PyYAML is a YAML 1.1 parser and emitter for Python.

How can I control what scalar form PyYAML uses for my data?

I've got an object with a short string attribute, and a long multi-line string attribute. I want to write the …

python yaml pyyaml
merge two yaml files in python

I have two yaml files as mentioned below test1.yaml resources: server_group_1: type: OS::Nova::ServerGroup properties: name: { get_…

python pyyaml ruamel.yaml
Performing arithmetic operation in YAML?

Sometimes I have to specify the time (in seconds) in the configuration file, and it's quite annoying to write exact …

python math yaml pyyaml
pyyaml and using quotes for strings only

I have the following YAML file: --- my_vars: my_env: "dev" my_count: 3 When I read it with PyYAML …

python quotes pyyaml
pyyaml is producing undesired !!python/unicode output

I am using pyyaml to dump an object to a file. There are several unicode strings in the object. I've …

python pyyaml
How can I create a yaml file from pure python?

Example from Using YAML with Python Original YAML file contains this # tree format treeroot: branch1: name: Node 1 branch1-1: name: …

python yaml pyyaml
Reading a configuration file in Python (storing/reading nested data with ConfigParser)

I am writing a list processing script that needs to read configuration data about each item in the list. The …

python configuration pyyaml
Load YAML nested with Jinja2 in Python

I have a YAML file (all.yaml) that looks like: ... var1: val1 var2: val2 var3: {{var1}}-{{var2}}.txt ... If …

python jinja2 dry pyyaml computed-properties
How to deserialize an object with PyYAML using safe_load?

Having a snippet like this: import yaml class User(object): def __init__(self, name, surname): self.name= name self.surname= …

python deserialization pyyaml
How to force PyYAML to load strings as unicode objects?

The PyYAML package loads unmarked strings as either unicode or str objects, depending on their content. I would like to …

python python-2.x pyyaml