Top "Pyyaml" questions

PyYAML is a YAML 1.1 parser and emitter for Python.

Can PyYAML dump dict items in non-alphabetical order?

I'm using yaml.dump to output a dict. It prints out each item in alphabetical order based on the key. &…

python dictionary yaml pyyaml
pyyaml: dumping without tags

I have >>> import yaml >>> yaml.dump(u'abc') "!!python/unicode 'abc'\n" But I want &…

python yaml pyyaml
How to replace environment variable value in yaml file to be parsed using python script

I need to use environment variable "PATH" in yaml file which needs to be parsed with a script. This is …

python python-2.7 pyyaml
pretty output with pyyaml

I have a python project where I'd like to use YAML (pyYaml 3.11), particularly because it is "pretty" and easy for …

python yaml pretty-print pyyaml
Parse yaml into a list in python

I am required to use YAML for a project. I have a YAML file which I am using to populate …

python list yaml pyyaml
Save/dump a YAML file with comments in PyYAML

I have a yaml file that looks like this: # The following key opens a door key: value Is there a …

python yaml pyyaml
Formatting PyYAML dump() output

I have a list of dictionaries, which I want to serialize: list_of_dicts = [ { 'key_1': 'value_a', 'key_2': …

python yaml pyyaml
How to read a python tuple using PyYAML?

I have the following YAML file named input.yaml: cities: 1: [0,0] 2: [4,0] 3: [0,4] 4: [4,4] 5: [2,2] 6: [6,2] highways: - [1,2] - [1,3] - [1,5] - [2,4] - [3,4] - [5,4] start: 1 end: 4 I'm …

python yaml pyyaml
How can I output blank value in python yaml file

I am writing yaml file like this with open(fname, "w") as f: yaml.safe_dump({'allow':'', 'deny': ''}, …

python yaml pyyaml
How to install pyYAML on windows 10

Im trying to install pyYAML from source on windows 10. I downloaded PyYAML 3.11 from https://pypi.python.org/pypi/PyYAML. When …

python windows pyyaml