pyquoks 2.3.2__tar.gz → 2.4.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyquoks
3
- Version: 2.3.2
3
+ Version: 2.4.0
4
4
  Summary: Пакет PyPI для часто используемых модулей в проектах diquoks
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -10,27 +10,10 @@ Requires-Python: >=3.14
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.14
13
- Requires-Dist: annotated-types (==0.7.0)
14
- Requires-Dist: blinker (==1.9.0)
15
- Requires-Dist: certifi (==2026.1.4)
16
- Requires-Dist: charset-normalizer (==3.4.4)
17
- Requires-Dist: click (==8.3.1)
18
- Requires-Dist: colorama (==0.4.6)
19
- Requires-Dist: flask (==3.1.2)
20
- Requires-Dist: idna (==3.11)
21
- Requires-Dist: itsdangerous (==2.2.0)
22
- Requires-Dist: jinja2 (==3.1.6)
23
- Requires-Dist: markupsafe (==3.0.3)
24
- Requires-Dist: pillow (==12.1.0)
25
- Requires-Dist: psutil (==7.2.1)
26
- Requires-Dist: pydantic (==2.12.5)
27
- Requires-Dist: pydantic-core (==2.41.5)
28
- Requires-Dist: requests (==2.32.5)
29
- Requires-Dist: typing-extensions (==4.15.0)
30
- Requires-Dist: typing-inspection (==0.4.2)
31
- Requires-Dist: urllib3 (==2.6.2)
32
- Requires-Dist: waitress (==3.0.2)
33
- Requires-Dist: werkzeug (==3.1.4)
13
+ Requires-Dist: pillow (>=12.1.0)
14
+ Requires-Dist: psutil (>=7.2.1)
15
+ Requires-Dist: pydantic (>=2.12.5)
16
+ Requires-Dist: requests (>=2.32.5)
34
17
  Description-Content-Type: text/markdown
35
18
 
36
19
  # pyquoks
@@ -0,0 +1,21 @@
1
+ [project]
2
+ name = "pyquoks"
3
+ version = "2.4.0"
4
+ description = "Пакет PyPI для часто используемых модулей в проектах diquoks"
5
+ authors = [
6
+ { name = "Denis Titovets <den232titovets@yandex.ru>" }
7
+ ]
8
+ license = { text = "MIT" }
9
+ readme = "README.md"
10
+ requires-python = ">=3.14"
11
+ dependencies = [
12
+ "pillow (>=12.1.0)",
13
+ "psutil (>=7.2.1)",
14
+ "pydantic (>=2.12.5)",
15
+ "requests (>=2.32.5)"
16
+ ]
17
+
18
+
19
+ [build-system]
20
+ requires = ["poetry-core (>=2.0.0, <3.0.0)"]
21
+ build-backend = "poetry.core.masonry.api"
@@ -1,11 +1,9 @@
1
1
  __all__ = [
2
2
  "data",
3
3
  "utils",
4
- "localhost",
5
4
  "test",
6
5
  ]
7
6
 
8
7
  from . import data
9
8
  from . import utils
10
- from . import localhost
11
9
  from . import test
@@ -331,7 +331,14 @@ class ConfigManager(utils._HasRequiredAttributes):
331
331
 
332
332
  setattr(self, attribute, value)
333
333
 
334
- self._config.set(self._SECTION, attribute, value)
334
+ match object_type():
335
+ case bool() | int() | float() | str():
336
+ self._config.set(self._SECTION, attribute, str(value))
337
+ case dict() | list():
338
+ self._config.set(self._SECTION, attribute, json.dumps(value))
339
+ case _:
340
+ raise ValueError(f"{object_type.__name__} type is not supported!")
341
+
335
342
  with open(self._parent._PATH, "w", encoding="utf-8") as file:
336
343
  self._config.write(file)
337
344
 
@@ -31,6 +31,8 @@ class TestCase(unittest.TestCase, utils._HasRequiredAttributes):
31
31
 
32
32
  @classmethod
33
33
  def setUpClass(cls) -> None:
34
+ super().setUpClass()
35
+
34
36
  cls._logger = data.LoggerService(
35
37
  filename=cls._MODULE_NAME,
36
38
  path=utils.get_path("tests/logs/"),
@@ -1,38 +0,0 @@
1
- [project]
2
- name = "pyquoks"
3
- version = "2.3.2"
4
- description = "Пакет PyPI для часто используемых модулей в проектах diquoks"
5
- authors = [
6
- { name = "Denis Titovets <den232titovets@yandex.ru>" }
7
- ]
8
- license = { text = "MIT" }
9
- readme = "README.md"
10
- requires-python = ">=3.14"
11
- dependencies = [
12
- "annotated-types (==0.7.0)",
13
- "blinker (==1.9.0)",
14
- "certifi (==2026.1.4)",
15
- "charset-normalizer (==3.4.4)",
16
- "click (==8.3.1)",
17
- "colorama (==0.4.6)",
18
- "flask (==3.1.2)",
19
- "idna (==3.11)",
20
- "itsdangerous (==2.2.0)",
21
- "jinja2 (==3.1.6)",
22
- "markupsafe (==3.0.3)",
23
- "pillow (==12.1.0)",
24
- "psutil (==7.2.1)",
25
- "pydantic (==2.12.5)",
26
- "pydantic-core (==2.41.5)",
27
- "requests (==2.32.5)",
28
- "typing-inspection (==0.4.2)",
29
- "typing-extensions (==4.15.0)",
30
- "urllib3 (==2.6.2)",
31
- "waitress (==3.0.2)",
32
- "werkzeug (==3.1.4)"
33
- ]
34
-
35
-
36
- [build-system]
37
- requires = ["poetry-core (>=2.0.0, <3.0.0)"]
38
- build-backend = "poetry.core.masonry.api"
@@ -1,51 +0,0 @@
1
- import typing
2
-
3
- import flask
4
- import waitress
5
-
6
- from . import utils
7
-
8
-
9
- class LocalhostFlask(flask.Flask, utils._HasRequiredAttributes):
10
- """
11
- Class for creating a simple localhost server
12
-
13
- **Required attributes**::
14
-
15
- _RULES = {"/": self.base_redirect}
16
-
17
- Attributes:
18
- _RULES: Dictionary with rules and functions
19
- """
20
-
21
- _REQUIRED_ATTRIBUTES = {
22
- "_RULES",
23
- }
24
-
25
- _RULES: dict[str, typing.Callable]
26
-
27
- def __init__(self, import_name: str) -> None:
28
- self._check_attributes()
29
-
30
- super().__init__(
31
- import_name=import_name,
32
- )
33
-
34
- for rule, view_func in self._RULES.items():
35
- self.add_url_rule(
36
- rule=rule,
37
- view_func=view_func,
38
- )
39
-
40
- def serve(self, port: int) -> None:
41
- """
42
- Starts this Flask application
43
-
44
- :param port: Port number
45
- """
46
-
47
- waitress.serve(
48
- app=self,
49
- host="127.0.0.1",
50
- port=port,
51
- )
File without changes
File without changes
File without changes