winipedia-pyside 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of winipedia-pyside might be problematic. Click here for more details.

@@ -0,0 +1,237 @@
1
+ Metadata-Version: 2.4
2
+ Name: winipedia-pyside
3
+ Version: 0.2.1
4
+ Summary: A package for pyside utils
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Author: Winipedia
8
+ Author-email: win.steveker@gmx.de
9
+ Requires-Python: >=3.12,<3.14
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Requires-Dist: pyqt-toast-notification (>=1.3.3,<2.0.0)
14
+ Requires-Dist: pyside6 (>=6.10.0,<7.0.0)
15
+ Requires-Dist: winipedia-utils (>=0.2.2,<0.3.0)
16
+ Description-Content-Type: text/markdown
17
+
18
+ # winipedia_pyside
19
+ (Some parts are AI generated and may contain errors)
20
+
21
+ A comprehensive PySide6 utilities package providing enhanced UI components, encrypted file streaming, and a full-featured media player framework for building sophisticated Qt-based applications.
22
+
23
+ ## Features
24
+
25
+ - **🎬 Full-Featured Media Player**: Complete media playback control with speed adjustment, volume control, progress tracking, and fullscreen support
26
+ - **🔐 Encrypted File Streaming**: AES-GCM encryption/decryption with transparent streaming for secure media playback
27
+ - **🎨 Reusable UI Components**: Pre-built widgets and base classes for rapid UI development
28
+ - **📱 Multi-Page Framework**: Abstract base classes for building multi-page applications with QStackedWidget
29
+ - **🔔 Toast Notifications**: Integrated notification system with auto-truncation
30
+ - **🎯 Type-Safe**: Full type hints with strict MyPy configuration
31
+ - **📚 Well-Documented**: Comprehensive docstrings following Google style guide
32
+
33
+ ## Installation
34
+
35
+ ### Requirements
36
+ - Python 3.12 - 3.13
37
+ - PySide6 >= 6.10.0
38
+
39
+ ### Install from PyPI
40
+
41
+ ```bash
42
+ pip install winipedia-pyside
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ### Basic Media Player
48
+
49
+ ```python
50
+ from pathlib import Path
51
+ from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
52
+ from winipedia_pyside.ui.widgets.media_player import MediaPlayer
53
+
54
+ app = QApplication([])
55
+ window = QMainWindow()
56
+ window.setWindowTitle("Media Player")
57
+
58
+ # Create central widget and layout
59
+ central_widget = QWidget()
60
+ layout = QVBoxLayout(central_widget)
61
+ window.setCentralWidget(central_widget)
62
+
63
+ # Create media player
64
+ player = MediaPlayer(layout)
65
+
66
+ # Play a video file
67
+ player.play_file(Path("path/to/video.mp4"))
68
+
69
+ window.show()
70
+ app.exec()
71
+ ```
72
+
73
+ ### Encrypted Media Playback
74
+
75
+ ```python
76
+ from pathlib import Path
77
+ from cryptography.hazmat.primitives.ciphers.aead import AESGCM
78
+ from winipedia_pyside.ui.widgets.media_player import MediaPlayer
79
+
80
+ # Initialize cipher
81
+ key = b"your-32-byte-key-here-1234567890" # 32 bytes for AES-256
82
+ aes_gcm = AESGCM(key)
83
+
84
+ # Create player and play encrypted file
85
+ player = MediaPlayer(layout)
86
+ player.play_encrypted_file(Path("path/to/encrypted_video.mp4"), aes_gcm)
87
+ ```
88
+
89
+ ### Show Notifications
90
+
91
+ ```python
92
+ from pyqttoast import ToastIcon
93
+ from winipedia_pyside.ui.widgets.notification import Notification
94
+
95
+ # Show a notification
96
+ notification = Notification(
97
+ title="Success",
98
+ text="Operation completed successfully",
99
+ icon=ToastIcon.SUCCESS,
100
+ duration=5000 # milliseconds
101
+ )
102
+ notification.show()
103
+ ```
104
+
105
+ ### Create Custom UI Components
106
+
107
+ ```python
108
+ from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel
109
+ from winipedia_pyside.ui.base.base import Base
110
+
111
+ class MyCustomWidget(Base, QWidget):
112
+ def base_setup(self) -> None:
113
+ """Initialize the Qt widget."""
114
+ self.setWindowTitle("My Custom Widget")
115
+
116
+ def pre_setup(self) -> None:
117
+ """Pre-setup operations."""
118
+ pass
119
+
120
+ def setup(self) -> None:
121
+ """Setup the main UI components."""
122
+ layout = QVBoxLayout(self)
123
+ label = QLabel("Hello, PySide6!")
124
+ layout.addWidget(label)
125
+
126
+ def post_setup(self) -> None:
127
+ """Post-setup operations."""
128
+ pass
129
+
130
+ # Use it
131
+ widget = MyCustomWidget()
132
+ widget.show()
133
+ ```
134
+
135
+ ## Core Modules
136
+
137
+ ### `winipedia_pyside.core`
138
+
139
+ #### PyQIODevice
140
+ A Python-friendly wrapper around PySide6's QIODevice with enhanced functionality.
141
+
142
+ ```python
143
+ from pathlib import Path
144
+ from winipedia_pyside.core.py_qiodevice import PyQFile
145
+
146
+ # Create a file device
147
+ file_device = PyQFile(Path("data.bin"))
148
+ file_device.open(QIODevice.ReadOnly)
149
+
150
+ # Read data
151
+ data = file_device.readData(1024)
152
+ file_device.close()
153
+ ```
154
+
155
+ #### EncryptedPyQFile
156
+ Transparent AES-GCM encryption/decryption for file streaming.
157
+
158
+ ```python
159
+ from pathlib import Path
160
+ from cryptography.hazmat.primitives.ciphers.aead import AESGCM
161
+ from winipedia_pyside.core.py_qiodevice import EncryptedPyQFile
162
+
163
+ key = b"your-32-byte-key-here-1234567890"
164
+ aes_gcm = AESGCM(key)
165
+
166
+ # Create encrypted file device
167
+ encrypted_file = EncryptedPyQFile(Path("encrypted_data.bin"), aes_gcm)
168
+ encrypted_file.open(QIODevice.ReadOnly)
169
+
170
+ # Read decrypted data transparently
171
+ decrypted_data = encrypted_file.readData(1024)
172
+ encrypted_file.close()
173
+ ```
174
+
175
+ ### `winipedia_pyside.ui`
176
+
177
+ #### Base UI Class
178
+ Abstract base class for all UI components with lifecycle management.
179
+
180
+ **Lifecycle Methods:**
181
+ - `base_setup()`: Initialize core Qt objects
182
+ - `pre_setup()`: Pre-initialization operations
183
+ - `setup()`: Main UI initialization
184
+ - `post_setup()`: Post-initialization operations
185
+
186
+ **Utility Methods:**
187
+ - `get_display_name()`: Get human-readable class name
188
+ - `get_subclasses()`: Discover all subclasses
189
+ - `get_svg_icon()`: Load SVG icons
190
+ - `set_current_page()`: Switch pages in multi-page apps
191
+ - `get_page()`: Retrieve specific pages
192
+
193
+ #### MediaPlayer Widget
194
+ Full-featured media player with comprehensive controls.
195
+
196
+ **Features:**
197
+ - Play/pause control
198
+ - Speed adjustment (0.2x - 5x)
199
+ - Volume control
200
+ - Progress slider with seeking
201
+ - Fullscreen toggle
202
+ - Support for both regular and encrypted files
203
+
204
+ **Methods:**
205
+ - `play_file(path, position)`: Play a regular video file
206
+ - `play_encrypted_file(path, aes_gcm, position)`: Play encrypted video
207
+ - `play_video(io_device, source_url, position)`: Play from custom IO device
208
+ - `toggle_playback()`: Toggle play/pause
209
+ - `change_speed(speed)`: Change playback speed
210
+ - `toggle_fullscreen()`: Toggle fullscreen mode
211
+
212
+ #### Notification Widget
213
+ Toast notification system with auto-truncation.
214
+
215
+ ```python
216
+ from winipedia_pyside.ui.widgets.notification import Notification
217
+ from pyqttoast import ToastIcon
218
+
219
+ notification = Notification(
220
+ title="Title",
221
+ text="Message text",
222
+ icon=ToastIcon.INFORMATION,
223
+ duration=10000
224
+ )
225
+ notification.show()
226
+ ```
227
+
228
+ ## Development
229
+ Comes with the winipedia_utils package and its testing framework.
230
+ Check out the [winipedia_utils](https://github.com/Winipedia/winipedia_utils) repository for more information on how to set up the development environment.
231
+
232
+ ## License
233
+
234
+ MIT License - Copyright (c) 2025 Winipedia
235
+
236
+ See [LICENSE](LICENSE) file for details.
237
+
@@ -18,7 +18,7 @@ winipedia_pyside/ui/widgets/notification.py,sha256=RM5oHfqWwvnf3tZ69uOlGrKkWhnpj
18
18
  winipedia_pyside/ui/windows/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
19
19
  winipedia_pyside/ui/windows/base/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
20
20
  winipedia_pyside/ui/windows/base/base.py,sha256=GMe6dhxrqMSiB_rIYr_dnjw3QYbYErDOoU0bqfEbEOw,1378
21
- winipedia_pyside-0.2.0.dist-info/METADATA,sha256=SkBoWX38z-fMLDS1joNMJJvXwKO5q-rKA4VZWfSo6hM,607
22
- winipedia_pyside-0.2.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
23
- winipedia_pyside-0.2.0.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
24
- winipedia_pyside-0.2.0.dist-info/RECORD,,
21
+ winipedia_pyside-0.2.1.dist-info/METADATA,sha256=V5K5KjJSw66wnddsC3mJ6BJnUz8CZr6521P-yYVXpnQ,6626
22
+ winipedia_pyside-0.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
23
+ winipedia_pyside-0.2.1.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
24
+ winipedia_pyside-0.2.1.dist-info/RECORD,,
@@ -1,20 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: winipedia-pyside
3
- Version: 0.2.0
4
- Summary: A package for pyside utils
5
- License-Expression: MIT
6
- License-File: LICENSE
7
- Author: Winipedia
8
- Author-email: win.steveker@gmx.de
9
- Requires-Python: >=3.12,<3.14
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.12
12
- Classifier: Programming Language :: Python :: 3.13
13
- Requires-Dist: pyqt-toast-notification (>=1.3.3,<2.0.0)
14
- Requires-Dist: pyside6 (>=6.10.0,<7.0.0)
15
- Requires-Dist: winipedia-utils (>=0.2.2,<0.3.0)
16
- Description-Content-Type: text/markdown
17
-
18
- # winipedia_pyside
19
- A package for pyside utils
20
-