A long-term, hands-on collection of Python labs for learning network automation. Each lab is a self-contained project that builds practical skills — from parsing device configs to interacting with live devices and orchestrating changes.
| # | Lab | What it does | Key skills |
|---|---|---|---|
| 01 | config-parser | Parses Cisco IOS configs and extracts per-interface data (name, description, IP) into CSV | file I/O, regex, dict/list modeling, csv |
| 02 | compliance-checker | Checks device configs against YAML-defined rules and outputs a CSV violation report | YAML rule engine, rules decoupled from code, layered architecture (extract / check / report), shared check logic, state machine |
git clone https://github.com/joeycodes/python-netauto-labs.git
cd python-netauto-labs
pip install -r requirements.txtThen run a lab, e.g. the compliance checker:
cd 02-compliance-checker
python compliance_checker.pyThis scans the sample config against the YAML rules and writes a <hostname>-compliance-<date>.csv report.
I want to use this repo to document and practice Python network automation — covering different areas from beginner to advanced, along with the relevant modules involved.
- Python 3.x
- Standard library:
re,csv,datetime - Third-party:
PyYAML(rule files) - More to come: Netmiko, Nornir, etc.
All device configs in this repo are sample/lab. No real hostnames, IPs, or credentials.
python-netauto-labs/
├── 01-config-parser/
│ ├── *parser.py
│ ├── csv-outputs
│ └── sample-configs
├── 02-compliance-checker/
│ ├── compliance-checker.py
│ ├── config/
│ ├── rules/
│ └── *-compliance-YYYYMMDD.csv
└── ...