orionis 0.366.0__py3-none-any.whl → 0.367.0__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.
@@ -12,7 +12,7 @@ class ConsoleProvider(ServiceProvider):
12
12
  """
13
13
  Register services into the application container.
14
14
  """
15
- self.app.transient(IConsole, Console, alias="console")
15
+ self.app.transient(IConsole, Console, alias="core.orionis.console")
16
16
 
17
17
  def boot(self) -> None:
18
18
  """
@@ -12,7 +12,7 @@ class DumperProvider(ServiceProvider):
12
12
  """
13
13
  Register services into the application container.
14
14
  """
15
- self.app.transient(IDebug, Debug, alias="dumper")
15
+ self.app.transient(IDebug, Debug, alias="core.orionis.dumper")
16
16
 
17
17
  def boot(self) -> None:
18
18
  """
@@ -0,0 +1,21 @@
1
+ from orionis.container.providers.service_provider import ServiceProvider
2
+ from orionis.services.paths.contracts.resolver import IResolver
3
+ from orionis.services.paths.resolver import Resolver
4
+
5
+ class PathResolverProvider(ServiceProvider):
6
+ """
7
+ Debug provider for the Orionis framework.
8
+ This provider is responsible for debugging functionalities.
9
+ """
10
+
11
+ def register(self) -> None:
12
+ """
13
+ Register services into the application container.
14
+ """
15
+ self.app.transient(IResolver, Resolver, alias="core.orionis.path_resolver")
16
+
17
+ def boot(self) -> None:
18
+ """
19
+ Perform any post-registration bootstrapping or initialization.
20
+ """
21
+ pass
@@ -12,7 +12,7 @@ class ProgressBarProvider(ServiceProvider):
12
12
  """
13
13
  Register services into the application container.
14
14
  """
15
- self.app.transient(IProgressBar, ProgressBar, alias="progress_bar")
15
+ self.app.transient(IProgressBar, ProgressBar, alias="core.orionis.progress_bar")
16
16
 
17
17
  def boot(self) -> None:
18
18
  """
@@ -0,0 +1,21 @@
1
+ from orionis.container.providers.service_provider import ServiceProvider
2
+ from orionis.services.system.contracts.workers import IWorkers
3
+ from orionis.services.system.workers import Workers
4
+
5
+ class WorkersProvider(ServiceProvider):
6
+ """
7
+ Debug provider for the Orionis framework.
8
+ This provider is responsible for debugging functionalities.
9
+ """
10
+
11
+ def register(self) -> None:
12
+ """
13
+ Register services into the application container.
14
+ """
15
+ self.app.transient(IWorkers, Workers, alias="core.orionis.workers")
16
+
17
+ def boot(self) -> None:
18
+ """
19
+ Perform any post-registration bootstrapping or initialization.
20
+ """
21
+ pass
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.366.0"
8
+ VERSION = "0.367.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -10,6 +10,18 @@ class IWorkers(ABC):
10
10
  according to the available CPU and memory resources of the current machine.
11
11
  """
12
12
 
13
+ @abstractmethod
14
+ def setRamPerWorker(self, ram_per_worker: float) -> None:
15
+ """
16
+ Set the amount of RAM allocated per worker.
17
+
18
+ Parameters
19
+ ----------
20
+ ram_per_worker : float
21
+ Amount of RAM (in GB) allocated per worker.
22
+ """
23
+ pass
24
+
13
25
  @abstractmethod
14
26
  def calculate(self) -> int:
15
27
  """
@@ -38,6 +38,17 @@ class Workers(IWorkers):
38
38
  self._ram_total_gb = psutil.virtual_memory().total / (1024 ** 3)
39
39
  self._ram_per_worker = ram_per_worker
40
40
 
41
+ def setRamPerWorker(self, ram_per_worker: float) -> None:
42
+ """
43
+ Set the amount of RAM allocated per worker.
44
+
45
+ Parameters
46
+ ----------
47
+ ram_per_worker : float
48
+ Amount of RAM (in GB) allocated per worker.
49
+ """
50
+ self._ram_per_worker = ram_per_worker
51
+
41
52
  def calculate(self) -> int:
42
53
  """
43
54
  Compute the maximum number of workers supported by the current machine.
@@ -12,4 +12,4 @@ class Console(Facade):
12
12
  str
13
13
  The service container binding key.
14
14
  """
15
- return "console"
15
+ return "core.orionis.console"
@@ -12,4 +12,4 @@ class Dumper(Facade):
12
12
  str
13
13
  The service container binding key.
14
14
  """
15
- return "dumper"
15
+ return "core.orionis.dumper"
@@ -0,0 +1,15 @@
1
+ from orionis.container.facades.facade import Facade
2
+
3
+ class PathResolver(Facade):
4
+
5
+ @classmethod
6
+ def getFacadeAccessor(cls):
7
+ """
8
+ Get the service container binding key for the dumper component.
9
+
10
+ Returns
11
+ -------
12
+ str
13
+ The service container binding key.
14
+ """
15
+ return "core.orionis.path_resolver"
@@ -12,4 +12,4 @@ class ProgressBar(Facade):
12
12
  str
13
13
  The service container binding key.
14
14
  """
15
- return "progress_bar"
15
+ return "core.orionis.progress_bar"
@@ -0,0 +1,15 @@
1
+ from orionis.container.facades.facade import Facade
2
+
3
+ class ProgressBar(Facade):
4
+
5
+ @classmethod
6
+ def getFacadeAccessor(cls):
7
+ """
8
+ Get the service container binding key for the dumper component.
9
+
10
+ Returns
11
+ -------
12
+ str
13
+ The service container binding key.
14
+ """
15
+ return "core.orionis.workers"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.366.0
3
+ Version: 0.367.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -238,11 +238,13 @@ orionis/foundation/exceptions/__init__.py,sha256=XtG3MJ_MFNY_dU5mmTyz_N_4QG1jYrc
238
238
  orionis/foundation/exceptions/integrity.py,sha256=mc4pL1UMoYRHEmphnpW2oGk5URhu7DJRREyzHaV-cs8,472
239
239
  orionis/foundation/exceptions/value.py,sha256=hQhXybXEnaa59ba7JxG65jceHt3mnql9MyekF-TChpM,465
240
240
  orionis/foundation/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
241
- orionis/foundation/providers/console_provider.py,sha256=Y7bdoZWaEh4ixU1u18wAz8UmV5sUJUvkU9jjQiB1c5A,687
242
- orionis/foundation/providers/dumper_provider.py,sha256=QdlJ2tJg0LVXnjkMy-LBmirmT1q0MVIyzMD6oA4FqP0,676
243
- orionis/foundation/providers/progress_bar_provider.py,sha256=fhp_GIm3O68dEcB6zSgcswQTcGXhOAFYCGZamWUXT2E,724
241
+ orionis/foundation/providers/console_provider.py,sha256=pAIklY1QKx2HKjTp7YyJT6KbJPlEEyzWSr79RTFkEK0,700
242
+ orionis/foundation/providers/dumper_provider.py,sha256=mLJDpNNNl4PV8oM_GKBvSxBcfXRxgiBlrA9Qg5WKi0A,689
243
+ orionis/foundation/providers/path_resolver_provider.py,sha256=rXvaVc5sSqmDgRzWJoattAW0ikO_SF3H7WBddVxwmhw,717
244
+ orionis/foundation/providers/progress_bar_provider.py,sha256=75Jr4iEgUOUGl8Di1DioeP5_HRQlR-1lVzPmS96sWjA,737
245
+ orionis/foundation/providers/workers_provider.py,sha256=WWlji3C69_-Y0c42aZDbR_bmcE_qZEh2SaA_cNkCivI,702
244
246
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
245
- orionis/metadata/framework.py,sha256=Hj5eKaWrsz5qSPsNvWlJKiN-i05Sb5Mw1OHEV0uEtt8,4960
247
+ orionis/metadata/framework.py,sha256=op40ECQ1mdpzRCwRBpTPfxxK748oM4rBeIjH_9TjRVw,4960
246
248
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
247
249
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
248
250
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -313,17 +315,19 @@ orionis/services/paths/exceptions/exception.py,sha256=cK-TbUT02X2lvbAP4yFdfHx4S4
313
315
  orionis/services/paths/exceptions/file.py,sha256=bsK0QoXwRFyDeHvITxwmgaBuwiO2eoRUhRzNizmX1No,475
314
316
  orionis/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
315
317
  orionis/services/system/imports.py,sha256=5j2Rkf6vMLnCQjqcox4-0y0tZoxgPfv7EP8eruG7vnA,4990
316
- orionis/services/system/workers.py,sha256=1HJCLHEJ7VcQZ4dqs0lYLVafEzvowLRdLvKffV1fewA,1877
318
+ orionis/services/system/workers.py,sha256=QO5IXjH8BXWUlHzH1TiRKt3vn4LZklRI02nSL17hWPo,2199
317
319
  orionis/services/system/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
318
320
  orionis/services/system/contracts/imports.py,sha256=nE2fDS2bDbwltHCmzOsEMhUymYy092zoGX-NOXLE4J4,1167
319
- orionis/services/system/contracts/workers.py,sha256=aZfQlij6mkPM2TcodDai7JYpTFNKL4YFAEj8Bd9Y4nw,707
321
+ orionis/services/system/contracts/workers.py,sha256=plst9CcYqwkEcy-LPdfJbdKPKaeq8hmtWk0B5mlH2wo,1017
320
322
  orionis/services/system/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
321
323
  orionis/services/system/runtime/imports.py,sha256=eWp_MmrvxWHl-lsNO0M5FC9OsCcY1BXsiJTlPk0cfRU,2550
322
324
  orionis/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
323
325
  orionis/support/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
324
- orionis/support/facades/console.py,sha256=uYajLxlGls_DpzdoTXFuwkfIla95ZvkTlQ1SOBmmC84,359
325
- orionis/support/facades/dumper.py,sha256=XfvLYuAPRq6izHNsstA3Q221cvUxCnIz7RAURH-BQig,357
326
- orionis/support/facades/progress_bar.py,sha256=w_Wup5izzNdD7dPTw3hVCxKJDqUj5uXMc5g73x38CjU,361
326
+ orionis/support/facades/console.py,sha256=Hx_VGZazpdPDkg1LgcCTzgASq7blzazGHXVNp2uN5w8,372
327
+ orionis/support/facades/dumper.py,sha256=JD0xT11ReLlzTH1O5wdIG1-r9sg1nriJnhtqkLsavW8,370
328
+ orionis/support/facades/path_resolver.py,sha256=-ro3-yxmjKHngf6aOy2dzyeNulsiSJuxu__vJWsRuUA,376
329
+ orionis/support/facades/progress_bar.py,sha256=ZmU7hojRP88PM39BX1fN0_2pTCUhOXdIqyKaQwPoQ-A,374
330
+ orionis/support/facades/workers.py,sha256=P-ppMQOzexbkcLDiGPdIPVA41LRlgNZcW-aB890ujk8,369
327
331
  orionis/support/formatter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
328
332
  orionis/support/formatter/serializer.py,sha256=g816osgwYzAzCnduDh2IyHvXx-fEhnVmw8EPZkDT5Ak,522
329
333
  orionis/support/formatter/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -372,7 +376,7 @@ orionis/test/output/dumper.py,sha256=3EV-G3KgEV4O0M4yl-4klPKc1etWOPZvPAcYhUQyXnI
372
376
  orionis/test/output/printer.py,sha256=WGjGW2lgu_l5wWJ6Z8qTTV7NAObhoTBcvhM1TcNvwU4,16938
373
377
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
378
  orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
375
- orionis-0.366.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
379
+ orionis-0.367.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
376
380
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
377
381
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
378
382
  tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
@@ -473,8 +477,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=hIVqGt19vbW22xPjQS
473
477
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
474
478
  tests/testing/test_testing_result.py,sha256=1O_8xjsFPnzwZOpLT6ImqjO9HY5_jIgP7DTVBsgHvQA,4335
475
479
  tests/testing/test_testing_unit.py,sha256=S3anwYcF2DBWYh_UfqKcZq2FgNpQjP0SfYVRd5sD5rI,7442
476
- orionis-0.366.0.dist-info/METADATA,sha256=6wSc8VpRqYC_ty0j9_IaSSxU8xsWlAkzxevxxGTeunE,4772
477
- orionis-0.366.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
478
- orionis-0.366.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
479
- orionis-0.366.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
480
- orionis-0.366.0.dist-info/RECORD,,
480
+ orionis-0.367.0.dist-info/METADATA,sha256=yr-g_H-M_u6IHsuT1kRN7I61Y9HyUwoM5-Y5ZVMd6xs,4772
481
+ orionis-0.367.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
482
+ orionis-0.367.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
483
+ orionis-0.367.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
484
+ orionis-0.367.0.dist-info/RECORD,,