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.
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.
Program outline
Outline points are grouped in one designed block instead of being treated as separate module cards.
Module 1: Turning a Manual Task into a Script
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
Module 2: Spreadsheets, CSV, and Document Output
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
Module 3: Working with APIs and Web Data
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
Module 4: Email, Notifications, and System Integration
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
Module 5: Scheduling, Configuration, and Secrets
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
Module 6: Reliability, Handover, and Adoption
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.
Related courses
Python Programming Fundamentals
A hands-on introduction to Python for engineers and analysts who need working code rather than tutorial fragments. Participants build fluency with data types, collections, functions, files, and error handling, then assemble a small program that reads real data and produces a usable report.
View courseIntermediate Python and Clean Code Practices
Designed for developers whose Python works but is difficult to change. The course covers dataclasses, generators, decorators, context managers, and type hints, then applies the refactoring moves that turn a nine-hundred-line module into small tested units guarded by black, ruff, and mypy.
View courseAdvanced Python: Concurrency and Performance
For engineers whose Python services and pipelines have hit a wall. The course starts with measurement — cProfile, py-spy, tracemalloc — then works through the GIL, threads, process pools, and asyncio, before covering NumPy vectorization, caching, and native acceleration for the paths that remain too slow.
View course