Beginner
Networking Data & Formats
Reading and writing JSON, YAML, and CSV — the formats that carry almost all real network automation data.
Real network automation runs on structured data, not plain text, and this module teaches the three formats you'll meet constantly: JSON, YAML, and CSV. You'll read and write each one directly in Python, understand why YAML is the format behind Ansible playbooks and Nornir inventories specifically, and finish with a practical, decision-based framework for choosing the right format for a given job -- then apply it in a script that merges a CSV inventory with a JSON config file into one report. This module sits between Python for Network Engineers and Your First Network Automation, and it's the missing piece connecting them: your new Python skills, applied to the data shapes every later module's inventories and configs actually use.
Next up
Why Structured Data Matters for Automation
0 / 5 completeLessons
- 1
Why Structured Data Matters for Automation
Why network automation depends on structured data formats like JSON, YAML, and CSV — not just Python dicts and lists living in memory.
Beginner10 min readNext up - 2
Working with JSON in Python
How to actually read and write JSON in Python using the standard library's json module — loads, load, dumps, and dump — with real, runnable examples.
Beginner12 min read - 3
Understanding YAML for Network Automation
How to read and correctly hand-write YAML — the human-editable format behind Ansible playbooks, Nornir inventories, and countless network automation config files.
Beginner12 min read - 4
Reading and Writing CSV Inventory Files
How to read a device inventory from a CSV file into a list of dictionaries, and write results back out to CSV, using Python's standard library csv module.
Beginner12 min read - 5
Choosing the Right Format for the Job
A practical decision framework for picking JSON, YAML, or CSV — and a real script that reads a CSV inventory and a JSON config file, and merges them into one report.
Beginner14 min read
Practice this module
Apply what you just covered -- hands-on practice and a knowledge check for this module.