HomePython POS System
Python POS Architecture

Python POS system with PySide6

Python is not the first language that comes to mind for a point-of-sale system. But with PySide6 (Qt), SQLAlchemy, and an offline-first architecture, it delivers a fully capable, cross-platform retail application — with one of the largest ecosystems for future extension.

Get Started View Source

Why Python for a POS application?

The common objection to Python for desktop applications is performance. In practice, POS workloads — barcode lookup, transaction recording, receipt printing — are I/O-bound, not compute-bound. Python 3.13 with PySide6 handles these workloads with zero perceptible latency on modern hardware.

The real advantage is ecosystem breadth: SQLAlchemy covers 7+ databases with a single ORM, PySide6 gives you a production-grade cross-platform UI toolkit, and the Python packaging system makes dependency management straightforward across Windows and Linux.

Python 3.13+

Latest CPython with improved performance, better error messages, and no-GIL experimental support for future threading improvements.

PySide6 (Qt 6.11)

The official Qt for Python binding. Touch-optimized widgets, hardware-accelerated rendering, cross-platform (Windows, Linux).

SQLAlchemy 2.0

100+ ORM models covering every aspect of a retail operation. Supports SQLite, PostgreSQL, MySQL, Oracle, MSSQL, Firebird, Sybase.

Technology stack

Python
3.13+
PySide6
6.11.0
SQLAlchemy
2.0.48
SQLite
default DB
PostgreSQL
production
TOML
config

PyPOS application layers

SaleFlex.PyPOS is structured in seven clearly separated layers. Each layer communicates only with its adjacent neighbours.

UI Layer
Dynamic FormsVirtual KeyboardNumPadSaleListPaymentListTabControl
Event Layer
SaleEventPaymentEventClosureEventProductEventCustomerEventCampaignEvent
Business Logic
SaleServicePaymentServiceCampaignServiceLoyaltyEarnServiceLoyaltyRedemptionServiceVatService
Integration
GateSyncServiceSyncWorker (QThread)BaseERPConnectorBasePaymentGateway
Peripherals
POSPrinter (ESC/P)CashDrawerBarcodeScannerScaleLineDisplay
Data Access
100+ SQLAlchemy ModelsAutoSave DescriptorsTemp/Permanent SplitSyncQueueItem
Cache & DB
pos_data cacheproduct_data cacheActiveCampaignCacheSQLite / PostgreSQL

Explore the Python POS source code

The full PyPOS codebase is on GitHub with architecture overview and getting-started walkthrough.

View on GitHub Architecture