Skip to main content

Lightweight framework based on PySide6 to quickly build modern desktop applications, with integrated resource, theme, and reusable component management.

Project description

๐Ÿš€ EzQt App

Python Platform Version PyPI Docs License Status Tests

EzQt Widgets Logo

EzQt App is a lightweight Python framework based on PySide6 to quickly build modern desktop applications, with integrated resource, theme, translation, and reusable component management. Built on a hexagonal architecture for clean separation of concerns.

๐Ÿ“ฆ Installation

pip install ezqt-app

Or from source:

git clone https://github.com/neuraaak/ezqt-app.git
cd ezqt-app && pip install .

๐Ÿš€ Quick Start

import sys
from ezqt_app.app import EzQt_App
from ezqt_app.services.application.app_service import AppService

# Initialize and run the framework
app_service = AppService()
app_service.initialize()

# Create main window
window = EzQt_App(themeFileName="main_theme.qss")

# Add navigation menus
home_page = window.addMenu("Home", "๐Ÿ ")
settings_page = window.addMenu("Settings", "โš™๏ธ")

# Show application
window.show()
app_service.exec()

๐ŸŽฏ Key Features

  • โœ… PySide6 Compatible: Full support for the latest PySide6 versions
  • โœ… Hexagonal Architecture: Clean domain/services/widgets separation
  • โœ… Full Type Hints: Complete typing support for IDEs and linters
  • โœ… Dynamic Themes: Light/dark themes with integrated toggle via QSS
  • โœ… Global Translation: Multi-language support (EN, FR, ES, DE)
  • โœ… Automatic Translation: Multi-provider system (LibreTranslate, MyMemory, Google)
  • โœ… CLI Tools: Project initialization, template generation, and management
  • โœ… Template System: Basic and advanced project scaffolding
  • โœ… Standardized Logging: Consistent message formatting across all components
  • โœ… Comprehensive Tests: Complete test suite (~176 tests)

๐Ÿ“š Documentation

Full documentation is available online: neuraaak.github.io/ezqt-app

๐Ÿ—๏ธ Architecture

EzQt App follows a hexagonal architecture with three main layers:

src/ezqt_app/
โ”œโ”€โ”€ domain/          # Contracts, ports, models, errors (no dependencies)
โ”‚   โ”œโ”€โ”€ ports/       # Abstract interfaces (AppPort, ConfigPort, etc.)
โ”‚   โ”œโ”€โ”€ models/      # Domain models
โ”‚   โ””โ”€โ”€ errors/      # Domain exceptions
โ”œโ”€โ”€ services/        # Adapters implementing domain ports
โ”‚   โ”œโ”€โ”€ application/ # App lifecycle (AppService, InitService)
โ”‚   โ”œโ”€โ”€ config/      # Configuration (ConfigService, SettingsService)
โ”‚   โ”œโ”€โ”€ translation/ # i18n (TranslationService, AutoTranslator)
โ”‚   โ””โ”€โ”€ ui/          # UI coordination (ThemeService, MenuService)
โ”œโ”€โ”€ widgets/         # PySide6 presentation layer
โ”‚   โ”œโ”€โ”€ core/        # Header, Menu, PageContainer
โ”‚   โ””โ”€โ”€ extended/    # SettingWidgets and advanced components
โ”œโ”€โ”€ shared/          # Cross-cutting utilities
โ”œโ”€โ”€ cli/             # Command-line interface
โ””โ”€โ”€ app.py           # Main EzQt_App entry point

๐Ÿงฉ Available Components

๐Ÿ”ง Application Services (ezqt_app.services)

Service Description
AppService Application lifecycle management
InitService Startup initialization and bootstrap
ConfigService Application configuration management
SettingsService User settings persistence
RuntimeStateService Runtime state tracking
TranslationService Language management and switching
ThemeService Theme loading and switching
MenuService Navigation menu management
WindowService Main window orchestration

๐ŸŒ Translation System (ezqt_app.services.translation)

Component Description
TranslationManager Central translation registry and dispatch
AutoTranslator Multi-provider automatic translation
StringCollector Automatic string discovery for translation

๐ŸŽจ Widgets (ezqt_app.widgets)

Widget Description
EzQt_App Main application window with modern UI
Header Top navigation bar with title and controls
Menu Sidebar navigation menu
PageContainer Content area manager
SettingWidgets Settings UI components with validation

๐Ÿงช Testing

Comprehensive test suite with 176+ test cases covering services, widgets, and integration scenarios.

# Install dev dependencies
pip install -e ".[dev]"

# Run all tests
pytest tests/

# Run by marker
pytest tests/ -m unit
pytest tests/ -m integration

# With coverage
pytest tests/ --cov=src/ezqt_app --cov-report=html

# Using CLI
ezqt test --unit
ezqt test --coverage

See the Testing Guide for complete details.

๐Ÿ–ฅ๏ธ CLI Commands

Project Management

# Initialize new project (assets, QRC, resources)
ezqt init [--force] [--verbose] [--no-main]

# Create project from template
ezqt create --template basic --name my_app
ezqt create --template advanced --name my_app

# Show project information
ezqt info

Development Tools

# Convert .ts translation files to .qm
ezqt convert [--verbose]
ezqt mkqm [--verbose]

# Run tests
ezqt test [--unit] [--integration] [--coverage]

# Serve documentation
ezqt docs [--serve] [--port <port>]

๐ŸŒ Translation System

from ezqt_app.shared.helpers import tr, set_tr

# Translate a string
text = tr("Hello World")  # Returns "Bonjour le monde" in French

# Bind a widget for auto-retranslation on language change
from PySide6.QtWidgets import QLabel
label = QLabel()
set_tr(label, "Hello World")

# Change active language
from ezqt_app.services.translation.translation_service import TranslationService
TranslationService.instance().set_language("Franรงais")

Supported languages: English, Franรงais, Espaรฑol, Deutsch Translation providers: LibreTranslate, MyMemory, Google Translate

๐Ÿ› ๏ธ Development Setup

# Clone and install in development mode
git clone https://github.com/neuraaak/ezqt-app.git
cd ezqt-app
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

# Verify CLI installation
ezqt --version
ezqt info

See the Development Guide for detailed instructions.

๐Ÿ“ฆ Dependencies

Runtime

  • PySide6>=6.7.3 โ€“ Qt for Python framework
  • requests>=2.32.4 โ€“ HTTP requests (translation providers)
  • click>=8.2.1 โ€“ CLI framework
  • PyYAML>=6.0 โ€“ YAML configuration
  • ruamel.yaml==0.18.6 โ€“ Advanced YAML processing

Development

  • pytest>=7.0.0 โ€“ Testing framework
  • pytest-cov>=4.0.0 โ€“ Coverage reporting
  • black>=23.0.0 โ€“ Code formatting
  • ruff>=0.1.0 โ€“ Linting
  • mypy / pyright โ€“ Type checking

๐Ÿ“„ License

MIT License โ€“ See LICENSE file for details.

๐Ÿ”— Links


EzQt App โ€“ Modern PySide6 application framework with hexagonal architecture. ๐Ÿš€

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezqt_app-5.0.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezqt_app-5.0.1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file ezqt_app-5.0.1.tar.gz.

File metadata

  • Download URL: ezqt_app-5.0.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for ezqt_app-5.0.1.tar.gz
Algorithm Hash digest
SHA256 e79e5a4adef8eba238ba757803dceda304c394fa1efde7e8cf8e50fd4394093f
MD5 d0e6c62d2c46ab507a62b80c95efff55
BLAKE2b-256 94f0c7ee94ff6d8b31d335fea00bd521a12e14a8573f5230b3636bef837d8615

See more details on using hashes here.

File details

Details for the file ezqt_app-5.0.1-py3-none-any.whl.

File metadata

  • Download URL: ezqt_app-5.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for ezqt_app-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 014952994ec6f43147b03c39a3bdc0c4fc9db439cfcb5e986a17457ed85aa9ea
MD5 ba22e787c6794c680b57856626a79fd2
BLAKE2b-256 ed5e777b796ad53bc67a028a6b634e65c5275e17f6b4024ca8cba34139ffcb17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page