pyquoks 2.3.1__py3-none-any.whl → 2.3.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.
pyquoks/__init__.py CHANGED
@@ -5,4 +5,7 @@ __all__ = [
5
5
  "test",
6
6
  ]
7
7
 
8
- from . import data, utils, localhost, test
8
+ from . import data
9
+ from . import utils
10
+ from . import localhost
11
+ from . import test
pyquoks/data.py CHANGED
@@ -160,6 +160,23 @@ class AssetsProvider(utils._HasRequiredAttributes):
160
160
  )
161
161
 
162
162
 
163
+ class EnvironmentProvider:
164
+ """
165
+ Class for providing environment variables
166
+ """
167
+
168
+ def __init__(self) -> None:
169
+ self.load_variables()
170
+
171
+ def load_variables(self) -> None:
172
+ """
173
+ Loads specified environment variables
174
+ """
175
+
176
+ for attribute in self.__class__.__annotations__.keys():
177
+ setattr(self, attribute, os.getenv(attribute, None))
178
+
179
+
163
180
  class StringsProvider:
164
181
  """
165
182
  Class for providing various strings data
@@ -314,7 +331,14 @@ class ConfigManager(utils._HasRequiredAttributes):
314
331
 
315
332
  setattr(self, attribute, value)
316
333
 
317
- 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
+
318
342
  with open(self._parent._PATH, "w", encoding="utf-8") as file:
319
343
  self._config.write(file)
320
344
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyquoks
3
- Version: 2.3.1
3
+ Version: 2.3.2.1
4
4
  Summary: Пакет PyPI для часто используемых модулей в проектах diquoks
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.14
13
13
  Requires-Dist: annotated-types (==0.7.0)
14
14
  Requires-Dist: blinker (==1.9.0)
15
- Requires-Dist: certifi (==2025.11.12)
15
+ Requires-Dist: certifi (==2026.1.4)
16
16
  Requires-Dist: charset-normalizer (==3.4.4)
17
17
  Requires-Dist: click (==8.3.1)
18
18
  Requires-Dist: colorama (==0.4.6)
@@ -0,0 +1,9 @@
1
+ pyquoks/__init__.py,sha256=hTEfFbalsc5BrQwTCb85Fq-eHRn3Oq3OnsVaQ8ZOuNY,162
2
+ pyquoks/data.py,sha256=bYS_iXOcH5bVqBdKi9xOdlKaUjerTolgrP2N2idhv-Y,19459
3
+ pyquoks/localhost.py,sha256=8exOFW_4uycDvlZTaVgtirWWD4mjuzrqPZvyFYsRD5g,1053
4
+ pyquoks/test.py,sha256=risnmQyfg4TYoXx5b6RNvH0bTZpYBAWbmRRzqqKDeSQ,3418
5
+ pyquoks/utils.py,sha256=shCyMYgpg8pGSJLuHqO4nEWDeTOAc7b5BjlgDVhvZV4,1861
6
+ pyquoks-2.3.2.1.dist-info/licenses/LICENSE,sha256=WYK66zwaBlCe_GnOwRCLlJCQibJ8oyqvpZ1CCsrcg2k,1095
7
+ pyquoks-2.3.2.1.dist-info/METADATA,sha256=terCfIrcr2GTmutoALMjf9Y9CtHvdxjk4dHwa3C85jg,1866
8
+ pyquoks-2.3.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
9
+ pyquoks-2.3.2.1.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Denis Titovets
3
+ Copyright (c) 2026 Denis Titovets
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,9 +0,0 @@
1
- pyquoks/__init__.py,sha256=u62PPaulBuYAxCYvLzsPkJb9hezXHCg6ZONHmnCJf-I,120
2
- pyquoks/data.py,sha256=S4lGXhO2m3H2BpBrV6MGdPUx-XEHT0YoIm2maVvoaZE,18685
3
- pyquoks/localhost.py,sha256=8exOFW_4uycDvlZTaVgtirWWD4mjuzrqPZvyFYsRD5g,1053
4
- pyquoks/test.py,sha256=risnmQyfg4TYoXx5b6RNvH0bTZpYBAWbmRRzqqKDeSQ,3418
5
- pyquoks/utils.py,sha256=shCyMYgpg8pGSJLuHqO4nEWDeTOAc7b5BjlgDVhvZV4,1861
6
- pyquoks-2.3.1.dist-info/licenses/LICENSE,sha256=eEd8UIYxvKUY7vqrV1XTFo70_FQdiW6o1fznseCXRJs,1095
7
- pyquoks-2.3.1.dist-info/METADATA,sha256=lTXwSnTVAXiRR_wtk9MchC3XHa5fvBlS8kAaC993FOQ,1866
8
- pyquoks-2.3.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
9
- pyquoks-2.3.1.dist-info/RECORD,,