4D Training & Consultancy

Software Development

Python Automation and Scripting for Work Tasks

Aimed at teams losing hours every week to repetitive file, spreadsheet, and reporting work. Participants automate those tasks with Python: batch file handling, Excel and CSV processing, REST API calls, email alerts, and scheduled jobs that run unattended and report clearly when something fails.

3 daysIn-house, online, or customized deliveryCorporate teams and professional groupsLevel: Foundation to Intermediate

Overview

Practical learning for workplace transfer.

Every department has a Thursday afternoon ritual: download four exports, paste them into one workbook, fix the date column, filter the rows nobody wants, and email a PDF to the same distribution list. It works until the person who does it is on leave. This course converts those rituals into scripts that anyone can run, and then into scheduled jobs that run themselves. The emphasis is on the parts amateurs skip — validating input before it corrupts a report, keeping credentials out of the file, making a rerun safe, and sending an alert when the job fails at three in the morning.

Prerequisites

Working knowledge of Python syntax: variables, loops, functions, and lists. Equivalent to the Python Programming Fundamentals course.

Objectives

  • Convert a documented manual procedure into a parameterized script others can run.
  • Process folders, Excel workbooks, and CSV exports in bulk with pathlib, openpyxl, and pandas.
  • Call REST APIs with authentication, pagination, timeouts, and retry with backoff.
  • Deliver results automatically by email, shared drive, or SFTP with attachments and alerts.
  • Schedule jobs with cron or Task Scheduler and keep credentials out of the source file.
  • Make an unattended script safe to rerun and easy for a colleague to take over.

Target audience

  • Finance, HR, and procurement staff producing recurring reports
  • IT administrators automating file, backup, and account routines
  • Business analysts consolidating exports from multiple systems
  • Operations and planning teams running scheduled data routines
  • Quality and compliance officers compiling evidence packs
  • Junior developers building internal tooling for non-technical users

Program outline

A clear structure for the learning journey.

Outline points are grouped in one designed block instead of being treated as separate module cards.

6modules24topics
  1. 01Turning a Manual Task into a Script4 topics
    • Mapping a repeated procedure into discrete, automatable steps
    • pathlib for finding, filtering, renaming, and archiving files at scale
    • Safe file operations: dry runs, backups, and reruns that stay idempotent
    • argparse and click so a script becomes a tool colleagues can run
  2. 02Spreadsheets, CSV, and Document Output4 topics
    • openpyxl for reading, writing, and formatting Excel workbooks
    • pandas for merging, cleaning, and pivoting tabular exports
    • Generating formatted PDF and Word deliverables from templates
    • Validating incoming data before it silently corrupts a report
    • HTTP requests, query parameters, headers, and parsing JSON responses
    • Authentication with API keys, bearer tokens, and reusable sessions
    • Pagination, rate limits, timeouts, and retry with exponential backoff
    • Extracting tables from HTML with requests and BeautifulSoup
    • Sending reports and alerts over SMTP with attachments and HTML bodies
    • Reading a mailbox and triggering actions from message content
    • Running shell commands with subprocess and capturing their output
    • Moving files between shared drives, SFTP servers, and cloud storage
    • Scheduling with cron, systemd timers, and Windows Task Scheduler
    • Configuration files and environment variables in place of hard-coded values
    • Keeping passwords and tokens out of scripts and out of version control
    • Structured logging and run summaries for jobs nobody is watching
    • Failure modes of unattended scripts and how each is detected
    • Retries, alert thresholds, and clean exit codes for scheduled tasks
    • Packaging a script with its dependencies so it runs on another machine
    • Documenting and handing over an automation so it outlives its author

Materials provided

  • Course workbook, annotated code samples, and reference notes
  • Hands-on lab environment and starter repositories
  • Exercises, checklists, and reusable code templates
  • 4D Certificate of Completion
  • Post-course technical guidance

Training Options

Programs can be delivered in-house, online, or in a blended format depending on your team's schedule, location, and learning objectives. When an external certificate or exam is included, certification rules and fees remain under the relevant awarding body's policies, while 4D provides the training and preparation support.

Why choose 4D

4D asks each participant to bring the task they actually repeat, and the course is built around automating those specific jobs. By the closing session most teams have between three and six working scripts covering their own exports, mailboxes, and reporting deadlines, each already scheduled and documented for handover rather than left as a classroom exercise.

Speak to 4D

Plan the right training or consultancy path for your team.

Share a few details and 4D will help route your inquiry toward corporate training, consultancy, assessment, Phoenix-enabled support, or a tailored program.