orionis 0.396.0__py3-none-any.whl → 0.397.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.
@@ -15,6 +15,7 @@ from orionis.foundation.config.session.entities.session import Session
15
15
  from orionis.foundation.config.startup import Configuration
16
16
  from orionis.foundation.config.testing.entities.testing import Testing
17
17
  from orionis.foundation.contracts.application import IApplication
18
+ from orionis.foundation.contracts.config import IConfig
18
19
 
19
20
  class Application(Container, IApplication):
20
21
  """
@@ -203,17 +204,17 @@ class Application(Container, IApplication):
203
204
  def withConfigurators(
204
205
  self,
205
206
  *,
206
- app: App = None,
207
- auth: Auth = None,
208
- cache : Cache = None,
209
- cors : Cors = None,
210
- database : Database = None,
211
- filesystems : Filesystems = None,
212
- logging : Logging = None,
213
- mail : Mail = None,
214
- queue : Queue = None,
215
- session : Session = None,
216
- testing : Testing = None,
207
+ app: App|IConfig = None,
208
+ auth: Auth|IConfig = None,
209
+ cache : Cache|IConfig = None,
210
+ cors : Cors|IConfig = None,
211
+ database : Database|IConfig = None,
212
+ filesystems : Filesystems|IConfig = None,
213
+ logging : Logging|IConfig = None,
214
+ mail : Mail|IConfig = None,
215
+ queue : Queue|IConfig = None,
216
+ session : Session|IConfig = None,
217
+ testing : Testing|IConfig = None
217
218
  ) -> 'Application':
218
219
  """
219
220
  Configure the application with various service configurators.
@@ -250,17 +251,59 @@ class Application(Container, IApplication):
250
251
  Returns self to allow method chaining.
251
252
  """
252
253
 
253
- # Load each configurator with default or provided instances
254
+ # Load app configurator
255
+ if app is not None and issubclass(app, IConfig):
256
+ app = app.config
254
257
  self.loadConfigApp(app or App())
258
+
259
+ # Load auth configurator
260
+ if auth is not None and issubclass(auth, IConfig):
261
+ auth = auth.config
255
262
  self.loadConfigAuth(auth or Auth())
263
+
264
+ # Load cache configurator
265
+ if cache is not None and issubclass(cache, IConfig):
266
+ cache = cache.config
256
267
  self.loadConfigCache(cache or Cache())
268
+
269
+ # Load cors configurator
270
+ if cors is not None and issubclass(cors, IConfig):
271
+ cors = cors.config
257
272
  self.loadConfigCors(cors or Cors())
273
+
274
+ # Load database configurator
275
+ if database is not None and issubclass(database, IConfig):
276
+ database = database.config
258
277
  self.loadConfigDatabase(database or Database())
278
+
279
+ # Load filesystems configurator
280
+ if filesystems is not None and issubclass(filesystems, IConfig):
281
+ filesystems = filesystems.config
259
282
  self.loadConfigFilesystems(filesystems or Filesystems())
283
+
284
+ # Load logging configurator
285
+ if logging is not None and issubclass(logging, IConfig):
286
+ logging = logging.config
260
287
  self.loadConfigLogging(logging or Logging())
288
+
289
+ # Load mail configurator
290
+ if mail is not None and issubclass(mail, IConfig):
291
+ mail = mail.config
261
292
  self.loadConfigMail(mail or Mail())
293
+
294
+ # Load queue configurator
295
+ if queue is not None and issubclass(queue, IConfig):
296
+ queue = queue.config
262
297
  self.loadConfigQueue(queue or Queue())
298
+
299
+ # Load session configurator
300
+ if session is not None and issubclass(session, IConfig):
301
+ session = session.config
263
302
  self.loadConfigSession(session or Session())
303
+
304
+ # Load testing configurator
305
+ if testing is not None and issubclass(testing, IConfig):
306
+ testing = testing.config
264
307
  self.loadConfigTesting(testing or Testing())
265
308
 
266
309
  # Return self instance for method chaining
@@ -14,6 +14,7 @@ from orionis.foundation.config.mail.entities.mail import Mail
14
14
  from orionis.foundation.config.queue.entities.queue import Queue
15
15
  from orionis.foundation.config.session.entities.session import Session
16
16
  from orionis.foundation.config.testing.entities.testing import Testing
17
+ from orionis.foundation.contracts.config import IConfig
17
18
 
18
19
  class IApplication(IContainer):
19
20
  """
@@ -60,17 +61,17 @@ class IApplication(IContainer):
60
61
  def withConfigurators(
61
62
  self,
62
63
  *,
63
- app: App = None,
64
- auth: Auth = None,
65
- cache: Cache = None,
66
- cors: Cors = None,
67
- database: Database = None,
68
- filesystems: Filesystems = None,
69
- logging: Logging = None,
70
- mail: Mail = None,
71
- queue: Queue = None,
72
- session: Session = None,
73
- testing: Testing = None,
64
+ aapp: App|IConfig = None,
65
+ auth: Auth|IConfig = None,
66
+ cache : Cache|IConfig = None,
67
+ cors : Cors|IConfig = None,
68
+ database : Database|IConfig = None,
69
+ filesystems : Filesystems|IConfig = None,
70
+ logging : Logging|IConfig = None,
71
+ mail : Mail|IConfig = None,
72
+ queue : Queue|IConfig = None,
73
+ session : Session|IConfig = None,
74
+ testing : Testing|IConfig = None
74
75
  ) -> 'IApplication':
75
76
  """
76
77
  Configure the application with multiple configuration entities.
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.396.0"
8
+ VERSION = "0.397.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.396.0
3
+ Version: 0.397.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
@@ -1,5 +1,3 @@
1
- config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- config/app.py,sha256=MJOS_SXC8-xGqGzhxPXI1e8cbCS-rEkq5IPCMY4osWY,3724
3
1
  orionis/__init__.py,sha256=4AGBG1xD3NjsqkmQ-fD3pde7tiO26iwOpdvJoNvP0kI,201
4
2
  orionis/_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
3
  orionis/_console/command_filter.py,sha256=bn0fcWfQg13DrQBaV4NopNxdP-6up0G54Qmhg7r_BKA,1211
@@ -148,7 +146,7 @@ orionis/container/validators/is_subclass.py,sha256=4sBaGLoRs8nUhuWjlP0VJqyTwVHYq
148
146
  orionis/container/validators/is_valid_alias.py,sha256=4uAYcq8xov7jZbXnpKpjNkxcZtlTNnL5RRctVPMwJes,1424
149
147
  orionis/container/validators/lifetime.py,sha256=IQ43fDNrxYHMlZH2zlYDJnlkLO_eS4U7Fs3UJgQBidI,1844
150
148
  orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
- orionis/foundation/application.py,sha256=lYj2m2B9vbvSjBZtm44CJaM_xtIPEPiV2U_5HL4eonU,32208
149
+ orionis/foundation/application.py,sha256=Nxv_0nfBec8mOlEFVED0UY7PFgWw_e5uBoM4e-0T2w8,33794
152
150
  orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
153
151
  orionis/foundation/config/startup.py,sha256=zutF-34DkW68bpiTxH9xrmIe1iJdXCF9Y6wueXS6qys,8265
154
152
  orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -237,7 +235,7 @@ orionis/foundation/config/testing/entities/testing.py,sha256=keU7dSuRv0rgaG-T4Vo
237
235
  orionis/foundation/config/testing/enums/__init__.py,sha256=tCHed6wBzqHx8o3kWBGm8tZYkYOKdSAx8TvgC-Eauv0,75
238
236
  orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
239
237
  orionis/foundation/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
- orionis/foundation/contracts/application.py,sha256=T8BexSV2k8QDcaAO4q_4mJrXaAdY-QIKq8XKGPYMPoI,16585
238
+ orionis/foundation/contracts/application.py,sha256=iFUGJBnA3Aqab9x4axqRiuzyORpwj37JL--Npjn1e1w,16739
241
239
  orionis/foundation/contracts/config.py,sha256=Rpz6U6t8OXHO9JJKSTnCimytXE-tfCB-1ithP2nG8MQ,628
242
240
  orionis/foundation/exceptions/__init__.py,sha256=XtG3MJ_MFNY_dU5mmTyz_N_4QG1jYrcv5RegBso7wuY,163
243
241
  orionis/foundation/exceptions/integrity.py,sha256=mc4pL1UMoYRHEmphnpW2oGk5URhu7DJRREyzHaV-cs8,472
@@ -249,7 +247,7 @@ orionis/foundation/providers/path_resolver_provider.py,sha256=rXvaVc5sSqmDgRzWJo
249
247
  orionis/foundation/providers/progress_bar_provider.py,sha256=75Jr4iEgUOUGl8Di1DioeP5_HRQlR-1lVzPmS96sWjA,737
250
248
  orionis/foundation/providers/workers_provider.py,sha256=WWlji3C69_-Y0c42aZDbR_bmcE_qZEh2SaA_cNkCivI,702
251
249
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
252
- orionis/metadata/framework.py,sha256=kxjCkfg2NZzlJu6qxHpkX3bp_ZuM2fv_eyk4RLNxfCQ,4960
250
+ orionis/metadata/framework.py,sha256=3OwHjKesqIuMb3OZJsgzL3Z4QTlMBLJQUt97yZPMFBY,4960
253
251
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
254
252
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
255
253
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -386,7 +384,7 @@ orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
386
384
  orionis/test/records/logs.py,sha256=EOQcloMVdhlNl2lU9igQz8H4b-OtKtiwh2pgr_QZWOI,13186
387
385
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
388
386
  orionis/test/view/render.py,sha256=zd7xDvVfmQ2HxZamDTzL2-z2PpyL99EaolbbM7wTah4,5014
389
- orionis-0.396.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
387
+ orionis-0.397.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
390
388
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
391
389
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
390
  tests/example/test_example.py,sha256=8G7kp74PZZ0Tdnw8WkheZ7lvZVFpdx_9ShOZBN9GEF0,25582
@@ -487,8 +485,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=nTNrvJkMSPx_aopEQ9
487
485
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
488
486
  tests/testing/test_testing_result.py,sha256=fnH7hjumNSErAFGITJgq2LHxSzvPF2tdtmHL9kyAv-Y,4409
489
487
  tests/testing/test_testing_unit.py,sha256=d3CRGo6608fMzYcZKIKapjx_af2aigqWiKSiuK9euIY,7600
490
- orionis-0.396.0.dist-info/METADATA,sha256=9aq9suQ-0E6MI-Ki3W1j4VaFWtOPmGi22qPq5OGx7EM,4772
491
- orionis-0.396.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
492
- orionis-0.396.0.dist-info/top_level.txt,sha256=udNmZ4TdfoC-7CBFJO7HLpWggpCM71okNNgNVzgpjt4,21
493
- orionis-0.396.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
494
- orionis-0.396.0.dist-info/RECORD,,
488
+ orionis-0.397.0.dist-info/METADATA,sha256=X8JYC_cF2qMEhVtEPBnle6XA82ikZIPBsGcG5bNjCi8,4772
489
+ orionis-0.397.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
490
+ orionis-0.397.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
491
+ orionis-0.397.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
492
+ orionis-0.397.0.dist-info/RECORD,,
@@ -1,3 +1,2 @@
1
- config
2
1
  orionis
3
2
  tests
config/__init__.py DELETED
File without changes
config/app.py DELETED
@@ -1,79 +0,0 @@
1
- from orionis.foundation.config.app.entities.app import App
2
- from orionis.foundation.contracts.config import IConfig
3
- from orionis.services.environment.helpers.functions import env
4
-
5
- class Config(IConfig):
6
-
7
- config = App(
8
-
9
- #--------------------------------------------------------------------------
10
- # Application Name
11
- #--------------------------------------------------------------------------
12
- # Defines the name of the application.
13
- #
14
- # This value is used in notifications, UI elements, logs, and anywhere
15
- # the application's name needs to be displayed.
16
- #--------------------------------------------------------------------------
17
-
18
- name = env('APP_NAME', 'Orionis'),
19
-
20
- #--------------------------------------------------------------------------
21
- # Debug Mode
22
- #--------------------------------------------------------------------------
23
- # Enables or disables detailed error reporting.
24
- #
25
- # When set to True, the application will display detailed error messages,
26
- # which is useful during development but should be disabled in production.
27
- #--------------------------------------------------------------------------
28
-
29
- debug = env('APP_DEBUG', False),
30
-
31
- #--------------------------------------------------------------------------
32
- # Timezone Configuration
33
- #--------------------------------------------------------------------------
34
- # Defines the application's default timezone.
35
- #
36
- # This setting ensures consistency when handling timestamps, logs,
37
- # and scheduled tasks. The default value is 'UTC'.
38
- #--------------------------------------------------------------------------
39
-
40
- timezone = env('APP_TIMEZONE', 'UTC'),
41
-
42
- #--------------------------------------------------------------------------
43
- # Uvicorn Server Configuration
44
- #--------------------------------------------------------------------------
45
- # Defines the settings for running the application with Uvicorn.
46
- #
47
- # - `url` : The host address for the application.
48
- # - `port` : The port number on which the application will run.
49
- # - `workers` : Number of worker processes to handle requests.
50
- # - `reload` : Enables auto-reloading when code changes (useful for development).
51
- #--------------------------------------------------------------------------
52
-
53
- url = env('APP_URL', '127.0.0.1'),
54
- port = env('APP_PORT', 8080),
55
- workers = env('APP_WORKERS', 1),
56
- reload = env('APP_RELOAD', False),
57
-
58
- #--------------------------------------------------------------------------
59
- # Application Encryption
60
- #--------------------------------------------------------------------------
61
- # Defines the encryption method and key used by the framework.
62
- #
63
- # The encryption method used is AES-256-GCM, which ensures secure data
64
- # encryption. The key should be properly set via environment variables.
65
- # Supported key sizes: 128, 192, or 256-bit.
66
- #--------------------------------------------------------------------------
67
-
68
- cipher = 'AES-256-GCM',
69
- key = env('APP_KEY'),
70
-
71
- #--------------------------------------------------------------------------
72
- # Additional Values
73
- #--------------------------------------------------------------------------
74
- # If your application requires additional configurations, you can define
75
- # them in this dictionary.
76
- #--------------------------------------------------------------------------
77
-
78
- # custom = {}
79
- )