Outline updated November 2026

Foundation14 hours delivered over 2-3 daysLive, online

Request this course

Task Automation with Python

Class Duration

14 hours of live training delivered over 2-3 days. Additional modules may lengthen the course.

Student Prerequisites

  • Basic understanding of Python programming.
  • Familiarity with command-line interfaces (CLI).
  • Basic knowledge of file systems and operating system concepts.

Target Audience

Developers, system administrators, DevOps engineers, and data professionals who want to automate development, data, and system tasks with Python. Teams moving on to distributed pipelines can continue with Distributed Task Processing with Python.

Description

This course teaches Python for automating development, data processing, and system administration tasks. Students set up an environment, add logging, and work with files, folders, and documents. They handle command-line arguments, regular expressions, subprocesses, environment variables, async programming, and API integrations. Optional modules cover AI coding agents, LLM provider APIs, and cloud storage. Modules on Airflow, Celery, or Kafka can be added for distributed automation and may lengthen the course.

Learning Outcomes

  • Explain the benefits of Python for task automation.
  • Set up VS Code with Ruff and mypy for Python scripts.
  • Use AI coding agents to draft and review automation scripts.
  • Add structured logging with levels, handlers, and formatters.
  • Handle errors and exit codes in automation scripts.
  • Manage environment variables across operating systems and subprocesses.
  • Process CSV, JSON, Excel, Word, and PDF files.
  • Parse command-line arguments with argparse and Click.
  • Search and transform text with regular expressions.
  • Orchestrate subprocesses, async I/O, and API calls from Python.

Training Materials

Comprehensive courseware is distributed online at the start of class.

Software Requirements

Students will need a free, personal GitHub account to access the courseware. Student machines will need a text editor, such as VS Code, and Python 3.13 or later; Pandoc and LibreOffice are needed only for the document conversion topics. Students will need permission to install PyPI packages. Preconfigured student virtual machines can be provided upon request. For some demonstrations, students will need access to 3rd party services such as AWS, Azure, and GitHub; the need for these services will be discussed as part of planning the specifics of the class.

Training Topics

Task Automation Foundations

  • What is task automation?
  • Why Python for task automation?
  • Python automation libraries
  • Python automation tools
  • Automation best practices
  • Task automation examples and ideas

Development Environment

  • Configuring Visual Studio Code for scripts
  • Linting and formatting with Ruff
  • Type checking with mypy
  • Debugging scripts in Visual Studio Code
  • Docker Desktop

AI Coding Assistants and Agents (optional)

  • GitHub Copilot in Visual Studio Code
  • AI help with Python and terminal commands
  • AI coding agents for automation scripts
  • Claude Code, GitHub Copilot, and OpenAI Codex
  • Project instructions for agents
  • Tests and guardrails for agents
  • Reviewing agent-generated scripts
  • Your team's AI coding tool (optional)

Logging

  • What is logging?
  • Benefits of logging
  • The logging module
  • Log levels
  • Log handlers
  • Log formatters
  • Your team's logging destination (optional)

Exit Codes

  • What are exit codes?
  • Returning exit codes
  • Capturing exit codes
  • Handling exit codes
  • Error handling, exit codes, and logging

Environment Variables

  • What are environment variables?
  • Setting variables on Windows, macOS, and Linux
  • Reading environment variables
  • Passing variables to child processes

Files, Folders, and Operating System

  • os vs. pathlib
  • Current working directory
  • File and folder paths
  • Reading and writing files
  • Asynchronous file reads and writes

Document Processing

  • CSV, JSON, and YAML files
  • Reading and writing Excel files
  • Converting Markdown to Word
  • Converting Word to PDF
  • Modifying Word files
  • Modifying PDF files
  • Your preferred file formats (optional)

High-Level File Operations

  • The shutil module
  • Copying, moving, and deleting files
  • Copying, moving, and deleting directory trees
  • Checking disk usage
  • Working with file archives
  • Creating, removing, and listing directories

Command Line Arguments

  • The argparse module
  • The Click package
  • Positional arguments
  • Named arguments
  • Default arguments
  • Argument data types
  • Argument documentation

Regular Expressions

  • Syntax overview
  • Regular expression objects
  • Searching and matching
  • Compilation flags
  • Groups and named groups
  • Replacing text
  • Splitting strings

Subprocess

  • subprocess.run
  • The Popen class
  • Running subprocesses
  • Capturing subprocess output
  • Exit codes

Concurrent and Network Programming

  • Orchestrating subprocesses
  • Accessing data sources asynchronously
  • File transfers with SFTP
  • S3 bucket uploads and downloads (optional)
  • Azure Blob Storage uploads and downloads (optional)
  • Calling LLM provider APIs (optional)
  • Embeddings and RAG with pgvector (optional)
  • GitHub REST API and webhooks (optional)
  • Automation in GitHub Actions with Docker (optional)
  • Your API integrations (optional)

Private team training

Bring this course to your team

Tell us about your team and we will tailor this outline to your tools, stack, and schedule. Courses can also be combined into a longer program.

  1. Tell us what you needYour tools, stack, team size, and timeline.
  2. We send a proposalA course or program, an outline adjusted to your team, and possible dates.
  3. Your team trains liveOnline or on-site, with courseware for every student.

Prefer to talk? Call +1 434-509-6890 or email help@cloudcontraptions.com.

We reply within 1 business day.

Training partner?