pyloid 0.24.6__tar.gz → 0.24.7__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.
@@ -198,4 +198,4 @@ Apache License
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyloid
3
- Version: 0.24.6
3
+ Version: 0.24.7
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -25,8 +25,7 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  <h2 align="center" style="font-size: 28px;"><b>Pyloid: Thread-Safe Desktop Apps—Unified with Any Frontend and Python Technology</b></h2>
27
27
 
28
-
29
- ## 💡 Key Features
28
+ ## 💡 Key Features
30
29
 
31
30
  - **All Frontend Frameworks** are supported
32
31
  - **All features necessary** for a desktop application are implemented
@@ -39,8 +38,6 @@ Description-Content-Type: text/markdown
39
38
  - Window Customization
40
39
  - **Detailed Numpy-style Docstrings**
41
40
 
42
-
43
-
44
41
  ## 🚀 Getting Started
45
42
 
46
43
  ### [Prerequisites](https://docs.pyloid.com/getting-started/prerequisites)
@@ -55,6 +52,10 @@ Description-Content-Type: text/markdown
55
52
  npm create pyloid-app@latest
56
53
  ```
57
54
 
55
+ ## Discord 🎉
56
+
57
+ [Our Discord!](https://discord.gg/VTqexxxTy9)
58
+
58
59
  ## Documentation 📚
59
60
 
60
61
  [Pyloid Documentation](https://docs.pyloid.com/)
@@ -6,8 +6,7 @@
6
6
 
7
7
  <h2 align="center" style="font-size: 28px;"><b>Pyloid: Thread-Safe Desktop Apps—Unified with Any Frontend and Python Technology</b></h2>
8
8
 
9
-
10
- ## 💡 Key Features
9
+ ## 💡 Key Features
11
10
 
12
11
  - **All Frontend Frameworks** are supported
13
12
  - **All features necessary** for a desktop application are implemented
@@ -20,8 +19,6 @@
20
19
  - Window Customization
21
20
  - **Detailed Numpy-style Docstrings**
22
21
 
23
-
24
-
25
22
  ## 🚀 Getting Started
26
23
 
27
24
  ### [Prerequisites](https://docs.pyloid.com/getting-started/prerequisites)
@@ -36,6 +33,10 @@
36
33
  npm create pyloid-app@latest
37
34
  ```
38
35
 
36
+ ## Discord 🎉
37
+
38
+ [Our Discord!](https://discord.gg/VTqexxxTy9)
39
+
39
40
  ## Documentation 📚
40
41
 
41
42
  [Pyloid Documentation](https://docs.pyloid.com/)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.24.6"
3
+ version = "0.24.7"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -40,7 +40,7 @@ from PySide6.QtWidgets import QSplashScreen, QLabel
40
40
  from typing import TYPE_CHECKING, Any
41
41
  from PySide6.QtWebEngineCore import (
42
42
  QWebEngineSettings,
43
- QWebEngineDesktopMediaRequest,
43
+ # QWebEngineDesktopMediaRequest, # 6.8.3 부터
44
44
  )
45
45
  import threading
46
46
 
@@ -55,7 +55,7 @@ class CustomWebPage(QWebEnginePage):
55
55
  def __init__(self, profile=None):
56
56
  super().__init__(profile)
57
57
  self.featurePermissionRequested.connect(self._handlePermissionRequest)
58
- self.desktopMediaRequested.connect(self._handleDesktopMediaRequest)
58
+ # self.desktopMediaRequested.connect(self._handleDesktopMediaRequest)
59
59
  self._permission_handlers = {}
60
60
  self._desktop_media_handler = None
61
61
  self._url_handlers = {} # URL 핸들러 저장을 위한 딕셔너리 추가
@@ -78,27 +78,27 @@ class CustomWebPage(QWebEnginePage):
78
78
  """Register a handler for a specific permission"""
79
79
  self._permission_handlers[feature] = handler
80
80
 
81
- def _handleDesktopMediaRequest(self, request: QWebEngineDesktopMediaRequest):
82
- return
83
- print("Desktop media request received:", request)
84
-
85
- # 사용 가능한 화면 목록 확인
86
- screens_model = request.screensModel()
87
- print("\n=== Available Screens ===")
88
- for i in range(screens_model.rowCount()):
89
- screen_index = screens_model.index(i)
90
- screen_name = screens_model.data(screen_index)
91
- print(f"Screen {i}: {screen_name}")
92
-
93
- # 사용 가능한 창 목록 확인
94
- windows_model = request.windowsModel()
95
- print("\n=== Available Windows ===")
96
- for i in range(windows_model.rowCount()):
97
- window_index = windows_model.index(i)
98
- window_name = windows_model.data(window_index)
99
- print(f"Window {i}: {window_name}")
100
-
101
- request.selectWindow(windows_model.index(3))
81
+ # def _handleDesktopMediaRequest(self, request: QWebEngineDesktopMediaRequest):
82
+ # return
83
+ # print("Desktop media request received:", request)
84
+
85
+ # # 사용 가능한 화면 목록 확인
86
+ # screens_model = request.screensModel()
87
+ # print("\n=== Available Screens ===")
88
+ # for i in range(screens_model.rowCount()):
89
+ # screen_index = screens_model.index(i)
90
+ # screen_name = screens_model.data(screen_index)
91
+ # print(f"Screen {i}: {screen_name}")
92
+
93
+ # # 사용 가능한 창 목록 확인
94
+ # windows_model = request.windowsModel()
95
+ # print("\n=== Available Windows ===")
96
+ # for i in range(windows_model.rowCount()):
97
+ # window_index = windows_model.index(i)
98
+ # window_name = windows_model.data(window_index)
99
+ # print(f"Window {i}: {window_name}")
100
+
101
+ # request.selectWindow(windows_model.index(3))
102
102
 
103
103
  # # interceptor ( navigation request )
104
104
  # def acceptNavigationRequest(self, url, navigation_type, is_main_frame):
@@ -20,7 +20,7 @@ class Store:
20
20
  os.makedirs(os.path.dirname(path), exist_ok=True)
21
21
  self.db = PickleDB(path)
22
22
 
23
- def get(self, key: str) -> Any:
23
+ def get(self, key: str, default: Any = None) -> Any:
24
24
  """
25
25
  Retrieve the value associated with the specified key.
26
26
 
@@ -28,6 +28,8 @@ class Store:
28
28
  ----------
29
29
  key: str
30
30
  The key to look up in the database
31
+ default: Any
32
+ The value to return if the value does not exist in the database
31
33
 
32
34
  Returns
33
35
  -------
@@ -44,8 +46,11 @@ class Store:
44
46
  {'name': 'John Doe', 'age': 30}
45
47
  >>> print(store.get("non_existent_key"))
46
48
  None
49
+ >>> print(store.get("non_existent_key", "default_value"))
50
+ 'default_value'
47
51
  """
48
- return self.db.get(key)
52
+ stored_value = self.db.get(key)
53
+ return stored_value if stored_value is not None else default
49
54
 
50
55
  def set(self, key: str, value: Any) -> bool:
51
56
  """
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes