What is YAML?

YAML Ain’t Markup Language (YAML) is often called a data serialization language. It was intended to be human-readable and organize data into a structured format. Programming languages can understand the content of YAML files (which usually have a .yml or .yaml extension) and map them to built-in data types. For example, when you consume a .yaml file in your Python script, it will automatically convert the content into either a dictionary {} or list [], so you can work and iterate over it.

YAML rules help to construct a readable file so it's important to understand them in order to write a valid and well formatted YAML file.

Get Hands-On Enterprise Automation with Python. now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.