Skip to content Skip to sidebar Skip to footer
Showing posts with the label Yaml

Pyyaml Parses '9:00' As Int

I have a file with the following data: classes: - 9:00 - 10:20 - 12:10 (and so on up to 21:0… Read more Pyyaml Parses '9:00' As Int

How Can I Ignore A Member When Serializing An Object With Pyyaml?

How can ignore the member Trivial._ignore when serializing this object? import yaml class Trivial(y… Read more How Can I Ignore A Member When Serializing An Object With Pyyaml?

Can I Speedup Yaml?

I made a little test case to compare YAML and JSON speed : import json import yaml from datetime im… Read more Can I Speedup Yaml?

Formatting Pyyaml Dump() Output

I have a list of dictionaries, which I want to serialize: list_of_dicts = [ { 'key_1': '… Read more Formatting Pyyaml Dump() Output

Dumping A Dictionary To A Yaml File While Preserving Order

I've been trying to dump a dictionary to a YAML file. The problem is that the program that impo… Read more Dumping A Dictionary To A Yaml File While Preserving Order

How To Do Yaml.safe_dump() And .safe_load() Of Python Object Without Yaml.yamlobject?

I want to serialize some object with yaml.safe_dump(). How can I serialize Python objects with add_… Read more How To Do Yaml.safe_dump() And .safe_load() Of Python Object Without Yaml.yamlobject?

Unicodedecodeerror While Processing Accented Words

I have a python script which reads a YAML file (runs on an embedded system). Without accents, the s… Read more Unicodedecodeerror While Processing Accented Words

How To Insert Key-value Pair Into Dictionary At A Specified Position?

How would I insert a key-value pair at a specified location in a python dictionary that was loaded … Read more How To Insert Key-value Pair Into Dictionary At A Specified Position?

How To Keep Null Value In Yaml File While Dumping Though Ruamel.yaml

I have YAML file site.yaml: Kvm_BLOCK: ip_address: 10.X.X.X property: null server_type: zone … Read more How To Keep Null Value In Yaml File While Dumping Though Ruamel.yaml

Having Issues Escaping Single Quote

I'm having a hard time escaping single quotes when adding new values to yaml with ruamel.yaml. … Read more Having Issues Escaping Single Quote

Change In A Yaml File Python

I have to replace tags like these in a yaml file. The data that used to be replaced is stored in a… Read more Change In A Yaml File Python

Parse Nested Custom Yaml Tags

I have some yaml with application-specific tags (from an AWS Cloud Formation template, to be exact)… Read more Parse Nested Custom Yaml Tags

Get Comment During Iteration In Ruamel.yaml

How can I get the comments when I iterate through the YAML object yaml = YAML() with open(path, &#… Read more Get Comment During Iteration In Ruamel.yaml

Parse Yaml And Assume A Certain Path Is Always A String

I am using the YAML parser from http://pyyaml.org and I want it to always interpret certain fields … Read more Parse Yaml And Assume A Certain Path Is Always A String

How To Parse Deeply Nested Yaml Data Structures In Python

We have a YAML file which looks somewhat like the following: all: children: allnetxsites: … Read more How To Parse Deeply Nested Yaml Data Structures In Python

Is There A Way In A Seed_data.yaml File To Autogenerate Models On Which First Model Is Dependent Upon?

I'm using Django 2.0, Python 3.7, and MySql 5. I have the following two models, the second dep… Read more Is There A Way In A Seed_data.yaml File To Autogenerate Models On Which First Model Is Dependent Upon?

How Can I Ignore A Member When Serializing An Object With PyYAML?

How can ignore the member Trivial._ignore when serializing this object? import yaml class Trivial(y… Read more How Can I Ignore A Member When Serializing An Object With PyYAML?

How To Fetch Partial Data From A Large Yaml File?

I have a large yaml file containing some useless data. When using yaml.load() to load this file, me… Read more How To Fetch Partial Data From A Large Yaml File?