Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
148190 stories
·
33 followers

What is a YAML file? A guide from basics to practical use

1 Share

YAML is a data serialization format used in Kubernetes files and Ansible playbooks. This article provides a detailed explanation of basic YAML file syntax and practical use cases. What's covered:

What is YAML?

YAML is a programming language designed to help express data concisely and understandably. It's frequently used for configuration files and data transfer. YAML is well-suited for organizing hierarchical information and is often used as an alternative to JSON and XML.

What is YAML used for?

Thanks to its easy readability, YAML is used for writing configuration files and playbooks. Here are some examples for reference:

  • Configuration file descriptions

  • Log files

  • Inter-process messaging

  • Data sharing between applications

  • Structured data descriptions

YAML vs. YML: What's the difference?

Both refer to the same file format — the only difference is whether the extension is .yml or .yaml. While .yaml is the official extension indicating a YAML file, extensions are generally written in three characters (like .txt, .zip, .exe, .png), so .yml conforms to this three-character convention. Developers who prefer concise notation often choose .yml.

YAML vs. JSON format differences

While JSON format uses curly braces to define requirements, YAML uses indentation to express structure, resulting in better readability. Compare the samples below. You'll see that YAML prioritizes ease of use for programmers. YAML: YAML key-value notation example

JSON:

JSON format key-value notation example

YAML vs. CUE comparison

While YAML has high readability and a simple structure, CUE integrates schemas and data, allowing complex configurations to be managed in a single file. CUE also has schema validation functionality that YAML alone cannot achieve, making it easier to ensure data consistency.

Flexibility is another major characteristic. CUE is an open source language (specifically, a superset of JSON) used to define, generate, and validate all kinds of data, so it can integrate with many other languages like Go, JSON, OpenAPI, Protocol Buffers, and YAML.

CUE also has scripting capabilities through the Go API, which comes in handy when displaying CUE-based manifests as final Kubernetes resource YAML or implementing commands to list resources for deployment to specific clusters.

YAML data structures and syntax (fundamentals)

Important notes for writing YAML files

Remember that indentation and tabs are extremely important. Extra indentation or tabs can change the meaning of YAML objects, making these elements critical.

YAML data structures

YAML primarily consists of two types of data: collections and scalars. Collections are made up of sequences and mappings. Sequences are arrays, and mappings are name-value pairs (expressed as Key: Value arrays). Scalars are used to distinguish types and represent strings, numbers, and other values.

  • Collections
    • Sequences
    • Mappings
  • Scalars

Writing YAML syntax

  • Multi-line collections: Use the | (vertical bar) symbol when you need to preserve the format of multiple lines.
  • Multi-line formatting: When you have long string values and need to write them across multiple lines while preserving the format, use >.
  • Lists: Lists are expressed using - (hyphens).
  • Nesting: Nested data structures are expressed using indentation.

Using YAML in GitLab

GitLab CI/CD pipelines use a YAML file called .gitlab-ci.yml for each project to define pipeline structure and execution order. The content configured in this file is processed within GitLab Runner. Please refer to this CI/CD YAML syntax.

Let's edit a YAML file

Thanks to its simplicity and readability, YAML is widely used across various applications, including configuration files, CI/CD pipelines, container orchestration tools like Kubernetes, documentation, and configuration management. Its readability enables developers and operations engineers to easily manage configurations and data, allowing them to work efficiently. Understanding YAML will make configuring various systems and tools simpler and more intuitive.

YAML FAQs

What is YAML used for?

Thanks to its simplicity and readability, YAML is widely used across various applications including configuration files, CI/CD pipelines, container orchestration tools like Kubernetes, documentation, and configuration management.

What's the difference between YAML and JSON?

While JSON files use curly braces to define requirements, YAML uses indentation to express structure, resulting in better readability. However, note that indentation and spacing are extremely important in YAML.

Why is YAML popular?

YAML is a popular data serialization language among developers because of its readability, versatility, and use of an indentation system similar to Python. YAML supports multiple data types and has parser libraries available for many programming languages, allowing it to handle various data serialization tasks and be utilized in a wide range of scenarios.

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Introducing Aspire - Modern app development made easy

1 Share
From: aspiredotdev
Duration: 9:06
Views: 32

Meet Aspire, the next big step for modern cloud apps. Aspire gives developers a code-first, extensible, and observable way to develop and deploy their entire app stack without endless YAML or configuration headaches.

With the Aspire AppHost, you define every service in code. With the CLI, you can run your full app locally, exactly as it would run in the cloud, with a single command. Aspire’s integrations make connecting to databases, APIs, and containers effortless, while its dashboard delivers built-in telemetry, logs, and traces so you can see your stack in action. Deploying your app from local development to the cloud is seamless and consistent.

Aspire is free and has become an open-source movement for passionate developers building apps across every language, stack, and framework.

👉 Learn more at https://aspire.dev

🚀 Try it today and see why developers love Aspire

#Aspire #Microsoft #cloudnative #distributedapps #devtools #programming #softwaredevelopment

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

How can I get started writing extensions for the Command Pallet in PowerToys?

1 Share
From: Microsoft Developer
Duration: 0:53
Views: 11

Want to build your own extensions for the new PowerToys Command Palette? Kayla Cinnamon walks through how easy it is to scaffold, build, and publish your first one straight from Visual Studio.

Learn more: https://msft.it/6056tE9Ni

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Authentic DevOps with AI Foundry + GitHub, on Sip & Sync with Azure

1 Share
From: Microsoft Developer
Duration: 13:24
Views: 137

Join us for another exciting episode of Sip and Sync with Azure! ☁️🎤 Host Katie Novotny welcomes Krystal Folkes, Software Global Black Belt at Microsoft, to explore how Azure AI Foundry agents can revolutionize DevOps workflows by integrating with GitHub and GitHub Copilot.
In this hands-on demo, Krystal walks through building a security-focused agent using MCP tools, connecting to GitHub's advanced security advisories, and orchestrating multi-agent workflows—all from a local machine. Whether you're a DevOps engineer, security lead, or developer curious about AI-powered automation, this episode is packed with insights to elevate your developer experience.

What You'll Learn:

- How to build a security agent using Azure AI Foundry
- Connecting GitHub MCP tools to automate vulnerability insights
- Using GitHub Copilot to fine-tune prompts for agent instructions
- Running agents locally with secure GitHub token authentication
- Orchestrating multi-agent workflows for DevOps, planning, and documentation
- Leveraging Azure Key Vault and managed identity for secure integrations

Chapters:
00:05 - Welcome & Introductions
00:25 - Enhancing Azure Identity Developer Experience
00:46 - What is Authentic DevOps?
01:02 - Connecting Azure AI Foundry Agents with GitHub
01:43 - Building a Security Agent with MCP Tools
03:05 - Demo: Python App with Azure AI Foundry SDK
04:28 - Prompt Engineering with GitHub Copilot
05:54 - Customizing Security Tool Access
06:54 - GitHub MCP Server Authorization Setup
08:03 - Running the Agent Locally
09:09 - Viewing Security Advisories in Action
10:59 - Multi-Agent Orchestration Possibilities
12:02 - Final Thoughts & Call to Action

Speakers:
Krystal Folkes – Software Global Black Belt, Microsoft
Crystal specializes in connecting Azure and GitHub technologies to create transformative developer experiences. In this episode, Crystal shares how to build intelligent agents that automate security workflows and enhance DevOps practices.
https://www.linkedin.com/in/krystalfolkes/

Katie Novotny – Host, Sip and Sync with Azure
Katie brings her expertise as a Global Black Belt at Microsoft to spotlight innovative developer tools and practices. She guides the conversation and helps unpack the technical magic behind the scenes.
https://www.linkedin.com/in/katie-novotny/

Links & Resources:

🚀 Learn more about Azure AI Foundry: https://learn.microsoft.com/azure/ai-services
🔍 GitHub Advanced Security: https://github.com/features/security
📝 GitHub Copilot: https://github.com/features/copilot
📚 Microsoft Learn: https://learn.microsoft.com
🎯 All Sip and Sync episodes: https://aka.ms/SipAndSyncPlaylist
🔔 Subscribe for more episodes: https://aka.ms/MicrosoftDeveloperYT

Hashtags:
#AzureAI #GitHubCopilot #DevOps #AzureFoundry #GitHubSecurity #AIAgents #MicrosoftDeveloper #SipAndSync #CloudComputing #PythonDev #VisualStudio #AzureKeyVault #MultiAgentSystems #LiveDemo #Tutorial

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Michael Kennedy: Managing Your Own Python Infrastructure

1 Share

How do you deploy your Python application without getting locked into an expensive cloud-based service? This week on the show, Michael Kennedy from the Talk Python podcast returns to discuss his new book, “Talk Python in Production.”

Michael runs multiple Python applications online, including a training site, blog, and two podcasts. While searching for the best solution for hosting his business, he documented his findings in a book. We talk about containerizing Python applications, generating static sites, preparing for traffic spikes, and avoiding cloud service lock-in.

Course Spotlight: Speed Up Python With Concurrency

Learn what concurrency means in Python and why you might want to use it. You’ll see a simple, non-concurrent approach and then look into why you’d want threading, asyncio, or multiprocessing.

Topics:

  • 00:00:00 – Introduction
  • 00:01:28 – Welcome back!
  • 00:03:05 – Is this your first book?
  • 00:04:13 – A book that reads like a blog
  • 00:06:15 – Incentives to keep you locked in
  • 00:09:20 – Following the journey of the Talk Python sites
  • 00:11:47 – Audio reader briefs
  • 00:15:19 – Discussing Dev Ops as a topic
  • 00:18:31 – Background of developing for the web
  • 00:20:14 – Stack-Native vs Cloud-Native
  • 00:24:40 – Using Quart web framework
  • 00:25:50 – Embracing Docker
  • 00:32:39 – Sharing a single powerful machine allows for individual peaks
  • 00:37:04 – Video Course Spotlight
  • 00:38:30 – Minimal cloud lock-in
  • 00:40:04 – Using OrbStack for local builds and testing
  • 00:42:07 – Coolify as a Docker host
  • 00:47:14 – Moving away from Google analytics and a GDPR rant
  • 00:50:43 – Diving deep into web tech of ngnix, SSL, and CDNs
  • 00:54:33 – Talking about the prices for hosting
  • 00:59:09 – Creating static sites
  • 01:06:22 – Invitation to come back to discuss AI and agents
  • 01:10:06 – What are you excited about in the world of Python?
  • 01:16:19 – What do you want to learn next?
  • 01:17:34 – What’s the best way to follow your work online?
  • 01:19:40 – Thanks and goodbye

Links:

Michael’s Recommended Hosting Locations:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas





Download audio: https://dts.podtrac.com/redirect.mp3/files.realpython.com/podcasts/RPP_E272_02_Michael.3932dd5b0ff8.mp3
Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

AGL 441: Magdalene Amegashitsi

1 Share

About Magdalene

Magdalene Amegashitsi is an accomplished digital and data leader, currently serving as Senior Manager in Digital Advisory at Avanade, where she brings over 12 years of experience in helping organisations unlock value from data through AI, data strategy, governance and digital innovation.

Throughout her career, Magdalene has held a variety of roles spanning Data & AI advisory, data science, team leadership and digital ethics. Her hands-on approach and strategic vision enable mission-driven organisations to transform through intelligent solutions that tie business, data and technology together.

A passionate advocate for inclusion, leadership and empowerment, she founded the Women’s Employee Network (WEN) for the UK & Ireland at Avanade in 2019. Under her leadership the community grew to 150+ active members, fostering growth, connection and professional development for women in technology and leadership.  In 2023, she took on the role of Co-Chair for the WEN for the Europe Chapter (covering 16 countries), broadening her impact across the region.

Magdalene’s dedication to driving change has also been recognised across the tech industry. Notably, she was selected as one of six Role Models and Ambassadors for the Tech Talent Charter “Doing It Anyway” campaign and in 2022 received the TechWomen100 Award by WeAreTheCity.

Outside of her corporate role, Magdalene invests in mentorship, hosts webinars, and partners with charities to support girls from under-privileged backgrounds in entering STEM and tech fields. Her personal mission: do what matters — creating impact, developing people, and building inclusive futures.


Today We Talked About

  • Magdalene’s background
  • AI
  • Anaiya
  • AI Governance
  • AI Strategy
  • Roadmap
  • Value
  • Data and Analytics
    • Time Saved
  • Change Adobption Journey
    • AI Ready Culture
    • High Engagement
    • Have Champions in each department/area
  • AI Transformation Engagement
  • Technical Mastery
  • Transformational Leadership
  • Organizational Navigation

Connect with Magdalene


Leave me a tip $
Click here to Donate to the show


I hope you enjoyed this show, please head over to Apple Podcasts and subscribe and leave me a rating and review, even one sentence will help spread the word.  Thanks again!


#1 in Technical Leadership





Download audio: https://media.blubrry.com/a_geek_leader_podcast__/mc.blubrry.com/a_geek_leader_podcast__/AGL_441_Magdalene_Amegashitsi.mp3?awCollectionId=300549&awEpisodeId=11800338&aw_0_azn.pgenre=Business&aw_0_1st.ri=blubrry&aw_0_azn.pcountry=US&aw_0_azn.planguage=en&cat_exclude=IAB1-8%2CIAB1-9%2CIAB7-41%2CIAB8-5%2CIAB8-18%2CIAB11-4%2CIAB25%2CIAB26&aw_0_cnt.rss=https%3A%2F%2Fwww.ageekleader.com%2Ffeed%2Fpodcast
Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories