PYTHON · VS CODE · pyodbc & pandas · OPC UA / MQTT / REST · EXCEL & PDF REPORTS

Python Scripting Training – Python for Real Plant Work

A Python course written for automation engineers, not for web developers. Set up VS Code, pip and virtual environments, then learn the language through plant examples with proper exception handling and logging. Connect Python to SQL Server with pyodbc and analyse the data with pandas, pull values straight from the controller over OPC UA, publish through MQTT and exchange data over REST — then automate Excel and PDF reports that email themselves on a schedule.

01Module 01 — Setup & Language: VS Code, venv, Control Flow, Classes & Logging
02Module 02 — Database: SQL Server with pyodbc, CRUD & pandas Analysis
03Module 03 — Connectivity: OPC UA, MQTT & REST API Data Exchange
04Module 04 — Reporting: Excel, PDF, Email, Scheduling & EXE Packaging

Classroom day batches · Online 7:30 PM–9:00 PM · Sunday 11:00 AM–5:00 PM

Python Scripting Training Contents
MODULE 01 · SETUP & LANGUAGEVS Code, venv, Fundamentals & LoggingInstall · pip · requirements.txt · control flow · functions · classes · try/except · log files6 Python training topics
MODULE 02 · DATABASESQL Server with pyodbc & pandasData types · connection strings · inserts · 10 CRUD scripts · DataFrames · cleaning6 Python training topics
MODULE 03 · CONNECTIVITYOPC UA, MQTT & REST APINode browsing · subscriptions · paho-mqtt · JSON payloads · REST endpoints · auth3 Python training topics
MODULE 04 · REPORTINGExcel, PDF, Email, Scheduling & EXEopenpyxl · PDF layout · SMTP · Task Scheduler · PyInstaller · unattended runs5 Python training topics
20practical Python topics across four modules
Python · Libraries · Engineering Skills

Skills & Tools You Will Use

See the tools, libraries and practical topics used at each stage of the Python scripting path. Select a module to view exactly what you will work with.

MODULE01
SETUP & LANGUAGE

Python Setup in VS Code, Fundamentals & Logging

INSTALL + WRITE + LOG

Software & Engineering Tools

Python 3VS Codepipvenvrequirements.txtlogging module

Core Practical Topics

Python installation and PATH setupVS Code extensions and interpreter selectionInstalling libraries with pipVirtual environments per projectReproducing an environment from requirements.txtVariables, lists, dictionaries and tuplesIf/else, for and while with plant examplesFunctions and reusable helpersModules, classes and objectstry/except blocks and log file output

Working Environment

Python 3Scripting runtime
VS CodeEditor and debugger
venvIsolated project environment
Log FilesUnattended run evidence

Training progression: Module 01 sets up the environment and the language, Module 02 connects Python to the plant database and analyses the data, Module 03 talks to the plant directly over OPC UA, MQTT and REST, and Module 04 turns all of it into reports that generate, email and schedule themselves.

View Detailed Python Training Contents →
PYTHON SCRIPTING TRAINING · DETAILED COURSE CONTENTS

Detailed Python Scripting Training Contents — Module 01, 02, 03 & 04

The Python course is organised as four practical modules covering 20 hands-on topics. Every topic below is a written guide with working script you can open before or after the session — from setup and language fundamentals through SQL Server and pandas to OPC UA, MQTT, REST and automated reporting.

04Practical Modules
20Python Topics
Python 3VS Code Environment
UA / MQTT / RESTPlant Connectivity
MODULE01
SETUP & LANGUAGE

Python Setup in VS Code, Language Fundamentals & Logging

Get a clean working environment and the language basics an automation engineer needs — installation, virtual environments, control flow, functions, modules and classes, and the exception handling and logging that keep a plant script from failing silently.

06Python
Topics
SETUP + SYNTAX + LOGGING
MODULE02
DATABASE

SQL Server with pyodbc & Data Handling with pandas

Connect Python to the plant database: data type mapping, connection strings, full CRUD with pyodbc, and reading query results into pandas for filtering, cleaning and summarising.

06Python
Topics
PYODBC + CRUD + PANDAS
MODULE03
PLANT CONNECTIVITY

OPC UA, MQTT & REST API Data Exchange in Python

Talk to the plant directly from Python: subscribe to controller values over OPC UA, publish and subscribe through an MQTT broker, and exchange data with business systems over REST.

03Python
Topics
OPC UA + MQTT + REST
MODULE04
REPORTING & DEPLOYMENT

Excel, PDF, Email, Scheduling & EXE Packaging

Deliver the output and make it run without you: formatted Excel workbooks and PDF reports, automatic email distribution, unattended scheduled runs, and a packaged executable for stations without Python.

05Python
Topics
EXCEL + PDF + AUTOMATION
Recommended learning order: Module 01 → Module 02 → Module 03 → Module 04. The sequence moves from environment setup and language fundamentals into database work with pyodbc and pandas, then into OPC UA, MQTT and REST connectivity, and finishes with automated Excel and PDF reporting, scheduling and deployment.

Frequently Asked Questions About Python Scripting Training

Who is this Python scripting training for?

Automation, SCADA and maintenance engineers who need to collect plant data, connect systems and produce reports. The examples are built around tags, shifts, alarms and production records rather than generic programming exercises.

Do I need programming experience to start?

No. The first module covers installation, virtual environments, control flow, functions, modules and classes from the beginning, so a PLC or SCADA engineer with no coding background can follow the whole course.

Which Python version and tools are used?

Python 3 with VS Code, pip and venv for environments, then pyodbc and pandas for database work, asyncua and paho-mqtt for plant connectivity, and openpyxl plus a PDF library for reporting. Each library is installed and explained during the sessions.

Can Python read data directly from a PLC?

Yes, through OPC UA in this course. A Python client connects to the controller's OPC UA server, browses node IDs, subscribes to value changes and stores the values, which is the vendor-neutral route used in most Industry 4.0 projects.

Is SQL Server work included or only scripting?

Database work is a full module: data type mapping, connection strings and authentication, creating tables, parameterised inserts, full CRUD operations, and reading query results into pandas for filtering, cleaning and summarising.

Can the reports run automatically without anyone starting them?

Yes. Scripts are scheduled with Windows Task Scheduler to run at shift end, generate the Excel or PDF report, email it to a distribution list, and write a log entry so you can prove the run happened.

What if Python cannot be installed on the SCADA station?

The course covers packaging a script as a standalone executable so the station can trigger it without a Python installation, which is the usual answer when IT policy blocks installations on a runtime PC.

Is MQTT and REST API integration covered?

Yes. Publishing and subscribing with paho-mqtt including topic and JSON payload design, and consuming or building REST endpoints so plant data can be exchanged with ERP, MES and web applications.

What are the batch timings?

Classroom sessions run in the day batches and live online sessions run from 7:30 PM to 9:00 PM on weekdays, with a Sunday batch from 11:00 AM to 5:00 PM. Corporate and in-plant groups can request a different schedule.

Request Python Scripting Syllabus, Fees & Batch Details

Send your requirement for Python scripting training. Mention your current programming level, what you need Python for (data collection, database work, reporting or integration) and whether it can be installed on the target machine, so the labs match your plant. Online batch runs 7:30 PM to 9:00 PM on weekdays and 11:00 AM to 5:00 PM on Sunday.

Online TrainingCorporate TrainingIn-Plant TrainingProject SupportWeekend Batch
Verified learning pathway

Discuss the Python Scripting Course

Explore the four modules, the environment and libraries used in the labs, the reporting output produced and classroom or online batch options.

Content reviewed: 18 September 2026

☎ Call WhatsApp ✉ Email Enquire Now