Skip to main content

winipyside

CI CD ProjectTester

ByteOrderMarkerFormatter CaseConflictChecker DependencyChecker EndOfFileFormatter EndOfLineFormatter JSONFormatter JSONLinter LargeFileChecker MarkdownLinter MergeConflictChecker ModuleTestNamingChecker PythonLinter SecretsChecker SecurityChecker ShellFormatter ShellLinter SpellChecker TOMLLinter TrailingWhitespaceFormatter TypeChecker YAMLLinter

PackageManager Pyrigger RemoteVersionController VersionControlHookManager VersionController

DocsBuilder PackageIndex ProgrammingLanguage License


A utilities package for PySide6


Overview

Winipyside is a production-ready PySide6 utilities package that provides reusable, well-tested components for building Qt desktop applications. It features encrypted file I/O with AES-GCM, a full-featured media player with encrypted video playback support, an embedded web browser with cookie management, toast notifications, and a modular page-based UI framework.

Key Highlights

  • ๐Ÿ” Encrypted File I/O: Transparent AES-GCM encryption for files and media playback
  • ๐ŸŽฌ Media Player: Full-featured player with encrypted video support, speed control, and fullscreen mode
  • ๐ŸŒ Web Browser: Embedded browser with cookie management and Qt/Python cookie conversion
  • ๐Ÿ”” Notifications: Toast notification system with auto-positioning and smart text truncation
  • ๐Ÿ—๏ธ UI Framework: Modular page-based architecture with lifecycle hooks and navigation
  • โœ… Type Safe: 100% type annotated with strict mypy checking
  • ๐Ÿงช Well Tested: Comprehensive test suite with pytest and pytest-qt
  • ๐Ÿš€ CI/CD Ready: Production-ready workflows for headless environments

Features

๐Ÿ” Encrypted File I/O

Transparent encryption/decryption for files and media with AES-GCM:

  • Chunked encryption for efficient streaming (64KB chunks)
  • Random access support with position mapping
  • Zero-copy decryption for media playback
  • Authenticated encryption with nonces and tags

๐ŸŽฌ Media Player

Full-featured video player with advanced controls:

  • Play/pause, speed control (0.2x-5x), volume slider
  • Seekable progress bar with throttled updates
  • Fullscreen mode with automatic UI hiding
  • Native encrypted video playback without temporary files
  • Position resumption and smart resource management

๐ŸŒ Web Browser

Embedded Chromium-based browser:

  • Navigation controls (back, forward, address bar)
  • Automatic cookie tracking
  • QNetworkCookie โ†” http.cookiejar.Cookie conversion
  • Domain-based cookie retrieval

๐Ÿ—๏ธ UI Framework

Modular architecture for building complex applications:

  • Lifecycle hooks: base_setup() โ†’ pre_setup() โ†’ setup() โ†’ post_setup()
  • Page-based navigation with QStackedWidget
  • Dynamic subclass discovery
  • SVG icon support
  • Automatic display name generation

Installation

Requirements

  • Python 3.12 or 3.13
  • PySide6
  • System dependencies (Linux only):
    • libegl1
    • libpulse0

Install from PyPI

pip install winipyside

Install from Source

git clone https://github.com/Winipedia/winipyside.git
cd winipyside
uv sync

Linux System Dependencies

sudo apt-get update
sudo apt-get install -y libegl1 libpulse0

Quick Start

Basic Application

from PySide6.QtWidgets import QApplication
from winipyside.src.ui.windows.base.base import Base as BaseWindow
from winipyside.src.ui.pages.browser import Browser


class MyApp(BaseWindow):
    @classmethod
    def get_all_page_classes(cls):
        return [Browser]

    @classmethod
    def get_start_page_cls(cls):
        return Browser

    def pre_setup(self) -> None:
        pass

    def setup(self) -> None:
        self.resize(1280, 720)

    def post_setup(self) -> None:
        pass


if __name__ == "__main__":
    app = QApplication([])
    window = MyApp()
    window.show()
    app.exec()

Encrypted Video Playback

from pathlib import Path
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from PySide6.QtCore import QUrl, QIODevice
from PySide6.QtMultimedia import QMediaPlayer, QAudioOutput
from winipyside.src.core.py_qiodevice import EncryptedPyQFile

# Generate encryption key
key = AESGCM.generate_key(bit_length=256)
aes_gcm = AESGCM(key)

# Play encrypted video
video_path = Path("encrypted_video.mp4")
encrypted_file = EncryptedPyQFile(video_path, aes_gcm)
encrypted_file.open(QIODevice.OpenModeFlag.ReadOnly)

player = QMediaPlayer()
player.setAudioOutput(QAudioOutput())
player.setSourceDevice(encrypted_file, QUrl.fromLocalFile(str(video_path)))
player.play()

Toast Notifications

from winipyside.src.ui.widgets.notification import Notification
from pyqttoast import ToastIcon

Notification(
    title="Success",
    text="Operation completed successfully!",
    icon=ToastIcon.SUCCESS,
    duration=5000,
)

Documentation

Comprehensive documentation is available in the docs/ directory:

  • Core Package - Encrypted file I/O and QIODevice wrappers
  • UI Base - Foundation framework and lifecycle management
  • UI Widgets - Reusable widgets (Browser, MediaPlayer, Notifications)
  • UI Pages - Page components for navigation
  • UI Windows - Main window framework
  • API Reference - Complete API documentation

Architecture

winipyside/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ core/              # Encrypted file I/O
โ”‚   โ””โ”€โ”€ ui/
โ”‚       โ”œโ”€โ”€ base/          # Base classes and lifecycle
โ”‚       โ”œโ”€โ”€ widgets/       # Reusable widgets
โ”‚       โ”œโ”€โ”€ pages/         # Page components
โ”‚       โ””โ”€โ”€ windows/       # Window framework
โ”œโ”€โ”€ resources/             # SVG icons and static resources
โ””โ”€โ”€ dev/
    โ”œโ”€โ”€ builders/          # Build utilities
    โ”œโ”€โ”€ cli/              # CLI commands
    โ”œโ”€โ”€ configs/          # CI/CD configuration
    โ””โ”€โ”€ tests/            # Test fixtures

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/Winipedia/winipyside.git
cd winipyside

# Install dependencies with uv
uv sync

# Install pre-commit hooks
uv run pre-commit install

# get familiar with pyrig

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository and create a feature branch
  2. Write tests for new functionality
  3. Ensure all tests pass and code quality checks succeed
  4. Update documentation as needed
  5. Submit a pull request with a clear description

Code Standards

  • Follow Google docstring convention
  • Maintain 100% type coverage
  • Write comprehensive tests (aim for >90% coverage)
  • Use descriptive variable names
  • Keep functions focused and small

License

This project is licensed under the MIT License, see the LICENSE file for details.

Acknowledgments

  • Built with Pyrig - Python project scaffolding framework
  • Uses PySide6 - Qt for Python
  • Toast notifications powered by pyqttoast

Support


Download files

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

Source Distribution

winipyside-4.14.47.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

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

winipyside-4.14.47-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file winipyside-4.14.47.tar.gz.

File metadata

  • Download URL: winipyside-4.14.47.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for winipyside-4.14.47.tar.gz
Algorithm Hash digest
SHA256 37bfcc65209b37ba1df956c317f206046839f0be9a664c21961a953eb29c386c
MD5 eee30d9cb6efc786904e03513bcf6f34
BLAKE2b-256 daa25b93e5272e79312f0a91709c05b743cc7ec4dbb589f8a768a4f4c045347b

See more details on using hashes here.

File details

Details for the file winipyside-4.14.47-py3-none-any.whl.

File metadata

  • Download URL: winipyside-4.14.47-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for winipyside-4.14.47-py3-none-any.whl
Algorithm Hash digest
SHA256 823c7cfc66295839275b0dd8f791fd6cfcd69ab4071123aa3bb8cd0bff6e374d
MD5 55193bf811c29ec9bcb3a9f5700cf1d3
BLAKE2b-256 70baf78fb0d6392063e7d20079438c91272bf8fdc86cc87e97df300dbe37d20a

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

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