Software · Beginner

Python Programming and IT Automation

Learn Python the way operations people use it: scripts, files, APIs, tests and scheduled automation on Ubuntu Server 24.04.

About this course

Most operations work is repetition: check the disks, list the services, pull a JSON feed, write a report, do it again tomorrow. This course teaches Python 3.12 as the tool for exactly that work, on an Ubuntu Server 24.04 machine in a terminal, with no desktop and no IDE required. You start with the interpreter, the REPL and virtual environments, then build up through strings, functions, collections, files (text, CSV, JSON and YAML), error handling and logging, packages and pinned dependencies, driving the operating system safely with `subprocess`, calling HTTP APIs with timeouts and retries, and finally testing with pytest and scheduling with cron and systemd timers. Every lesson ends with a working script you keep in a small project directory that grows across the course. The final project is a server inventory and health report tool: it reads a YAML inventory, runs local disk, service and uptime checks, writes JSON and Markdown reports, exposes a command-line interface, ships with a pytest suite, and runs on a timer. It is graded by a rubric plus automated checks on your lab machine. Every command in the course was executed on Ubuntu 24.04 LTS with Python 3.12.3 and the output you see is the output we observed. A hosted lab machine (`linux01`) is provided for convenience; the course is complete on your own Linux, macOS or Windows machine, and each lesson notes where those platforms differ. This is a learning pathway toward roles that automate infrastructure (systems administration, platform and DevOps work, backend development). It does not promise employment, seniority, salary or any vendor certification; completing it earns an Ultiblob Certificate of Completion.

Content time
15 h 30 min
Lessons
10
Certificate
Yes
on completion
Choose a career path

Lesson 1 is free. Enroll in a career path to access its full courses.

Lesson 1 is a free preview — read it without an account.

Software — the kind of infrastructure this course is practised on

Outline

Lessons

10 lessons · 15 h 30 min
  1. Lesson 1: Python for operations peopleFree preview

    Why Python belongs in an operations toolkit, how to run it interactively and as a script, and how to build an isolated project with venv and pip on Ubuntu 24.04.

    1 h 15 min
  2. Lesson 2: Values, types, strings and f-strings

    Work with numbers, text, booleans and None, take apart log lines and host names with string methods, and format readable output with f-strings.

    1 h 20 min
  3. Lesson 3: Control flow and functions

    Make decisions with if/elif/else, repeat work with for and while, and package logic into small documented functions that return values you can test.

    1 h 30 min
  4. Lesson 4: Collections

    Choose between lists, tuples, dictionaries and sets to hold inventories, count and group hosts, compare two sources, and write comprehensions that stay readable.

    1 h 35 min
  5. Lesson 5: Files and paths

    Use pathlib to build paths and read or write text, then move an inventory between CSV, JSON and YAML with the standard library and PyYAML's safe loader.

    1 h 40 min
  6. Lesson 6: Errors, exceptions and logging

    Read tracebacks, catch specific exceptions, raise your own, log at the right level with the logging module, and return exit codes that shells and schedulers can act on.

    1 h 30 min
  7. Lesson 7: Modules, packages and dependencies

    Turn loose scripts into an importable package, understand how Python finds modules, and pin dependencies so another machine reproduces your environment exactly.

    1 h 30 min
  8. Lesson 8: Automating the OS

    Run system commands from Python with subprocess without shell-injection risk, use os and shutil for files and the environment, and build a real command-line tool with argparse.

    1 h 40 min
  9. Lesson 9: Talking to APIs and the web

    Fetch JSON over HTTP with the standard library and requests, always set timeouts, retry transient failures without retrying real errors, and keep secrets out of your source code.

    1 h 40 min
  10. Lesson 10: Testing and scheduling

    Write and run pytest tests with fixtures, package a script as an installable command, and run it automatically with cron and systemd timers.

    1 h 50 min

Where it leads

Part of these career paths