Python for Automation and Scripting | Nesqual Tech
All coursesPython for Automation and Scripting Build reliable command-line tools with the Python standard library: parse files and logs, call APIs, run programs safely, test, schedule and package them.
Access Starter
Level Intermediate
Duration 45 h
Sections 90 Start free Included in Starter, Pro and Elite .
Course outline From script to tool When automation pays off Lesson 25 min Anatomy of a tool Lesson 30 min Standard streams, redirection and pipes Lesson 30 min Project layout, packages and python3 -m Lesson 30 min Idempotency, dry runs and safe to run twice Lesson 30 min How a tool finds its files and settings Lesson 30 min Chapter quiz: from script to tool Quiz 15 min Command-line interfaces Practical IT courses with real labs, graded checks and verifiable certificates.
© 2026 Nesqual Tech
Parsers, arguments and actions
Lesson 30 min
Subcommands and shared options Lesson 30 min
Validating input and exit code 2 Lesson 30 min
Files, standard input and output formats Lesson 30 min
Defaults, precedence and help text Lesson 30 min
Quiz: command-line interfaces Quiz 15 min
Lab: give depot its command line Lab 40 min Files and bulk operations Paths as values: pathlib in depth Lesson 30 min Finding files: patterns, walks and filters Lesson 30 min Changing files safely: copy, move, delete Lesson 30 min Atomic writes, temporary files and lock files Lesson 30 min Hashing, checksums and finding duplicates Lesson 30 min Plan, then act: dry runs and undo logs Lesson 35 min Chapter quiz: files and bulk operations Quiz 15 min Lab: a tidy tool with a plan, a dry run and an undo log Lab 40 min Text and log parsing Regular expressions that extract: compile, groups and flags Lesson 30 min Greedy and lazy, anchors, lookaround and runaway patterns Lesson 32 min Rewriting text: sub, split and redacting a log Lesson 30 min Parsing log lines into records Lesson 32 min Streaming big logs and summarising them Lesson 33 min When not to use a regex, and how to test one Lesson 28 min Text and log parsing quiz Quiz 15 min Lab: stream a log and summarise it Lab 40 min Data formats and configuration CSV done properly Lesson 30 min Validating rows and keeping the rejects Lesson 30 min JSON done properly Lesson 30 min Configuration files: INI and TOML Lesson 30 min Layered settings: defaults, file, environment, flags Lesson 35 min Secrets in automation Lesson 30 min Chapter quiz: data formats and configuration Quiz 15 min Lab: summarise orders with layered settings Lab 40 min Subprocess and shelling out subprocess.run, properly Lesson 30 min Why shell=True is dangerous Lesson 30 min The child's environment and identity Lesson 30 min Streaming output and connecting processes Lesson 35 min Running Python from Python Lesson 30 min Wrapping external tools robustly Lesson 35 min Chapter quiz: subprocess and shelling out Quiz 15 min Lab: build a careful tool runner and fix an unsafe script Lab 40 min Archives, dates and scheduling Zip and tar: building and reading archives Lesson 30 min Extracting archives safely Lesson 35 min Backups you can trust Lesson 35 min Dates and times for automation Lesson 35 min Scheduling: cron, timers and loops Lesson 35 min Running safely on a schedule Lesson 35 min Chapter quiz: archives, dates and scheduling Quiz 15 min HTTP clients and local APIs Anatomy of an HTTP request Lesson 30 min Errors, timeouts and what to retry Lesson 30 min Retries, backoff and polite clients Lesson 35 min Authentication and keeping secrets out of sight Lesson 30 min Building a local API to test against Lesson 35 min Building depot fetch Lesson 35 min Chapter quiz: HTTP clients and local APIs Quiz 15 min Lab: a careful client for the orders API Lab 40 min Logging and error handling The logging model Lesson 30 min Configuring handlers, formats and verbosity Lesson 35 min Designing errors that help Lesson 30 min Failing well Lesson 35 min Patterns for unattended runs Lesson 35 min Reading your logs and a post-mortem Lesson 35 min Chapter quiz: logging and error handling Quiz 15 min Concurrency for I/O Waiting versus computing, and why threads help Lesson 30 min Threads, locks and queues by hand Lesson 30 min Thread pools and futures with concurrent.futures Lesson 30 min Practical patterns - fetching, hashing and checking in parallel Lesson 30 min Processes for CPU-bound work, and choosing a model Lesson 30 min Limits, deadlocks, races and when not to bother Lesson 30 min Chapter quiz: concurrency for I/O Quiz 15 min Testing and packaging Testing automation code Lesson 30 min Testing with files, output and real processes Lesson 30 min Mocking the outside world Lesson 35 min What to test, and how much Lesson 30 min Packaging a tool for colleagues Lesson 30 min Distributing and supporting a tool Lesson 30 min Testing and packaging quiz Quiz 15 min Capstone: the depot tool Planning the finished tool: requirements, modules and build order Lesson 30 min Assembling the core: moving code into the package Lesson 30 min The command layer: commands, output and exit codes Lesson 30 min Hardening review: finding what the tests do not Lesson 35 min Building and handing over: depot.pyz, the README and 1.0.0 Lesson 30 min Where next: growing depot and what to study after it Lesson 20 min Capstone quiz: finishing the depot tool Quiz 15 min Lab: finish depot 1.0.0 Lab 40 min