winipedia-pyside 0.2.0__tar.gz → 0.2.3__tar.gz

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