#Python

157 posts

Build a Desktop App with PySide6 #7: Packaging and Distribution — Building Executables with PyInstaller
7 min read

Build a Desktop App with PySide6 #7: Packaging and Distribution — Building Executables with PyInstaller

Bundle the app with PyInstaller so it runs on computers without Python installed. The onedir vs onefile trade-off, including data files, platform-specific caveats, and pyside6-deploy — the final part of the series.

Python Packaging #3 pyproject.toml: The Standard for Project Configuration
4 min read

Python Packaging #3 pyproject.toml: The Standard for Project Configuration

How the era of setup.py and scattered config files converged into the single pyproject.toml: metadata and dependency declarations in the project table, separating optional features and dev tooling with extras and dependency-groups, the role of build-system, and the practical layout that gathers ruff and pytest settings under the tool table.

Build a Desktop App with PySide6 #6: Threads and Timers — Keeping the UI Responsive
6 min read

Build a Desktop App with PySide6 #6: Threads and Timers — Keeping the UI Responsive

See exactly why wiring a long task to a button freezes the whole window, then fix it with the QThread + Worker pattern — the canonical code that keeps the UI responsive. Also covers QTimer for periodic work.

Python Packaging #2 pip and requirements.txt: The Limits of the Traditional Workflow
4 min read

Python Packaging #2 pip and requirements.txt: The Limits of the Traditional Workflow

How pip works and the requirements.txt workflow — and where the approach falls apart. Reading version specifiers, pip freeze's inability to distinguish direct from transitive dependencies, the reproducibility hole where unpinned installs differ by the day, and constraints files, building the case for why the next generation of tools exists.

Build a Desktop App with PySide6 #5: Model/View — Connecting Data to Lists and Tables
7 min read

Build a Desktop App with PySide6 #5: Model/View — Connecting Data to Lists and Tables

We hit the limits of stuffing data directly into widgets and move to Qt model/view. Subclassing QAbstractTableModel, change notification, a QSortFilterProxyModel search filter, and selection handling — all practiced on a todo table.

Python Packaging #1 Virtual Environments: Why Environments Break, and venv
5 min read

Python Packaging #1 Virtual Environments: Why Environments Break, and venv

Starting from the structural cause of broken Python environments: the path import searches and the conflicts born from having a single site-packages, why the system Python must be left alone and what the PEP 668 error means, isolating each project with venv, and the fact that activate is nothing more than PATH manipulation.

When Your Python Server Is Slow — Finding the Bottleneck in 5 Minutes with py-spy
5 min read

When Your Python Server Is Slow — Finding the Bottleneck in 5 Minutes with py-spy

Using py-spy, the sampling profiler that attaches to a running Python process with no code changes or restarts: dump to identify a hung process, top for live bottleneck watching, record and flame graphs, --idle for off-CPU waits, reading the GIL numbers, and running it in containers.

Build a Desktop App with PySide6 #4: Qt Designer and UI Files — Draw the Screen, Then Load It
7 min read

Build a Desktop App with PySide6 #4: Qt Designer and UI Files — Draw the Screen, Then Load It

Draw your screen with Qt Designer, which ships with PySide6, and load the .ui file in two ways: pyside6-uic and QUiLoader. We practice the code-and-screen separation workflow on the todo app form.

Build a Desktop App with PySide6 #3: Signals and Slots — the Core of Event Handling
5 min read

Build a Desktop App with PySide6 #3: Signals and Slots — the Core of Event Handling

A tour of signals and slots, the center of event handling in Qt. From clicked.connect through signals that carry arguments to custom signals declared with Signal, and wiring real behavior into the todo app.

Build a Desktop App with PySide6 #2: Widgets and Layouts — Assembling the Screen
5 min read

Build a Desktop App with PySide6 #2: Widgets and Layouts — Assembling the Screen

A catalog of the widgets you will use most, and how to assemble a real screen by nesting QVBoxLayout and QHBoxLayout. We build the screen skeleton of the todo app we will extend throughout the series.

Build a Desktop App with PySide6 #1: What PySide6 Is — Desktop Apps with Qt and Python
6 min read

Build a Desktop App with PySide6 #1: What PySide6 Is — Desktop Apps with Qt and Python

A comparison of your options for building desktop apps in Python, and the case for PySide6, the official Qt bindings. We go from installation to showing your first window and understanding what the event loop means.

Microsoft Graph in Practice #7: Operations — Throttling, Pagination, Delta Queries, Change Notifications
6 min read

Microsoft Graph in Practice #7: Operations — Throttling, Pagination, Delta Queries, Change Notifications

Raising Graph automation to operational grade: retries that honor 429 and Retry-After, the pagination (@odata.nextLink) that silently truncates data when missed, delta queries replacing polling (deltaLink state management), change notification subscriptions (validation handshake, renewal, lifecycleNotificationUrl), and JSON batching — closing the series.