pyquoks 1.2.0__tar.gz → 1.2.1__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.
- {pyquoks-1.2.0 → pyquoks-1.2.1}/PKG-INFO +1 -1
- {pyquoks-1.2.0 → pyquoks-1.2.1}/setup.cfg +1 -1
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks/data.py +4 -4
- pyquoks-1.2.1/src/pyquoks/localhost.py +19 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks/models.py +4 -4
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks.egg-info/PKG-INFO +1 -1
- pyquoks-1.2.0/src/pyquoks/localhost.py +0 -15
- {pyquoks-1.2.0 → pyquoks-1.2.1}/LICENSE +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/README.md +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/pyproject.toml +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/requirements.txt +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks/__init__.py +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks/utils.py +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks.egg-info/SOURCES.txt +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks.egg-info/dependency_links.txt +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks.egg-info/requires.txt +0 -0
- {pyquoks-1.2.0 → pyquoks-1.2.1}/src/pyquoks.egg-info/top_level.txt +0 -0
|
@@ -76,21 +76,21 @@ class IAssetsProvider:
|
|
|
76
76
|
_PATH: str = None
|
|
77
77
|
_NAMES: set[str]
|
|
78
78
|
|
|
79
|
-
def __init__(self, parent: IAssetsProvider):
|
|
79
|
+
def __init__(self, parent: IAssetsProvider) -> None:
|
|
80
80
|
for i in self._NAMES:
|
|
81
81
|
setattr(self, i, parent.file_image(parent._PATH.format(self._PATH.format(i))))
|
|
82
82
|
|
|
83
83
|
class INetwork:
|
|
84
84
|
_URLS: dict[str, str]
|
|
85
85
|
|
|
86
|
-
def __init__(self, parent: IAssetsProvider):
|
|
86
|
+
def __init__(self, parent: IAssetsProvider) -> None:
|
|
87
87
|
for k, v in self._URLS:
|
|
88
88
|
setattr(self, k, parent.network_image(v))
|
|
89
89
|
|
|
90
90
|
_PATH: str
|
|
91
91
|
_ASSETS_OBJECTS: dict[str, type]
|
|
92
92
|
|
|
93
|
-
def __init__(self):
|
|
93
|
+
def __init__(self) -> None:
|
|
94
94
|
for k, v in self._ASSETS_OBJECTS.items():
|
|
95
95
|
setattr(self, k, v(self))
|
|
96
96
|
|
|
@@ -125,7 +125,7 @@ class IStringsProvider:
|
|
|
125
125
|
|
|
126
126
|
_STRINGS_OBJECTS: dict[str, type]
|
|
127
127
|
|
|
128
|
-
def __init__(self):
|
|
128
|
+
def __init__(self) -> None:
|
|
129
129
|
for k, v in self._STRINGS_OBJECTS.items():
|
|
130
130
|
setattr(self, k, v())
|
|
131
131
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import waitress, flask
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ILocalhostFlask(flask.Flask):
|
|
6
|
+
_RULES: dict[str, function]
|
|
7
|
+
|
|
8
|
+
def __init__(self, import_name: str) -> None:
|
|
9
|
+
super().__init__(import_name)
|
|
10
|
+
|
|
11
|
+
for k, v in self._RULES.items():
|
|
12
|
+
self.add_url_rule(rule=k, view_func=v)
|
|
13
|
+
|
|
14
|
+
def serve(self, port: int) -> None:
|
|
15
|
+
waitress.serve(
|
|
16
|
+
app=self,
|
|
17
|
+
host="127.0.0.1",
|
|
18
|
+
port=port,
|
|
19
|
+
)
|
|
@@ -7,7 +7,7 @@ class IContainer:
|
|
|
7
7
|
_OBJECTS: dict[str, type] = None
|
|
8
8
|
data: dict
|
|
9
9
|
|
|
10
|
-
def __init__(self, json_data: dict):
|
|
10
|
+
def __init__(self, json_data: dict) -> None:
|
|
11
11
|
setattr(self, "data", json_data)
|
|
12
12
|
if isinstance(self._ATTRIBUTES, set):
|
|
13
13
|
for i in self._ATTRIBUTES:
|
|
@@ -31,7 +31,7 @@ class IModel:
|
|
|
31
31
|
_OBJECTS: dict[str, type] = None
|
|
32
32
|
data: dict | list[dict]
|
|
33
33
|
|
|
34
|
-
def __init__(self, json_data: dict | list[dict]):
|
|
34
|
+
def __init__(self, json_data: dict | list[dict]) -> None:
|
|
35
35
|
setattr(self, "data", json_data)
|
|
36
36
|
if isinstance(self._ATTRIBUTES, set):
|
|
37
37
|
for i in self._ATTRIBUTES:
|
|
@@ -55,9 +55,9 @@ class IModel:
|
|
|
55
55
|
class IValues:
|
|
56
56
|
_ATTRIBUTES: set[str] = None
|
|
57
57
|
|
|
58
|
-
def __init__(self, **kwargs):
|
|
58
|
+
def __init__(self, **kwargs) -> None:
|
|
59
59
|
for i in self._ATTRIBUTES:
|
|
60
60
|
setattr(self, i, kwargs.get(i, None))
|
|
61
61
|
|
|
62
|
-
def update(self, **kwargs):
|
|
62
|
+
def update(self, **kwargs) -> None:
|
|
63
63
|
self.__init__(**kwargs)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
import waitress, flask
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class ILocalhostFlask(flask.Flask):
|
|
6
|
-
_RULES: dict[str, function]
|
|
7
|
-
|
|
8
|
-
def __init__(self):
|
|
9
|
-
super().__init__(import_name="osu!parser")
|
|
10
|
-
|
|
11
|
-
for k, v in self._RULES.items():
|
|
12
|
-
self.add_url_rule(rule=k, view_func=v)
|
|
13
|
-
|
|
14
|
-
def serve(self):
|
|
15
|
-
waitress.serve(app=self, host="127.0.0.1", port=727)
|
|
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
|