orionis 0.441.0__py3-none-any.whl → 0.442.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.
@@ -24,16 +24,24 @@ from orionis.services.log.contracts.log_service import ILoggerService
24
24
 
25
25
  class Application(Container, IApplication):
26
26
  """
27
- Application container that manages service providers and application lifecycle.
27
+ Main application container that manages the complete application lifecycle.
28
28
 
29
- This class extends Container to provide application-level functionality including
30
- service provider management, kernel loading, and application bootstrapping.
31
- It implements a fluent interface pattern allowing method chaining.
29
+ This class extends the Container to provide comprehensive application-level
30
+ functionality including service provider registration and bootstrapping, kernel
31
+ management, configuration handling, and application initialization. It implements
32
+ a fluent interface pattern to enable method chaining for configuration setup.
33
+
34
+ The Application class serves as the central orchestrator for the Orionis framework,
35
+ managing the loading and booting of service providers, framework kernels, and
36
+ various configuration subsystems such as authentication, caching, database,
37
+ logging, and more.
32
38
 
33
39
  Attributes
34
40
  ----------
35
41
  isBooted : bool
36
- Read-only property indicating if the application has been booted
42
+ Read-only property indicating whether the application providers have been booted.
43
+ startAt : int
44
+ Read-only property containing the timestamp when the application was started.
37
45
  """
38
46
 
39
47
  @property
@@ -41,12 +49,13 @@ class Application(Container, IApplication):
41
49
  self
42
50
  ) -> bool:
43
51
  """
44
- Check if the application providers have been booted.
52
+ Determine whether the application service providers have been booted.
45
53
 
46
54
  Returns
47
55
  -------
48
56
  bool
49
- True if providers are booted, False otherwise
57
+ True if all service providers have been successfully booted and the
58
+ application is ready for use, False otherwise.
50
59
  """
51
60
  return self.__booted
52
61
 
@@ -55,12 +64,13 @@ class Application(Container, IApplication):
55
64
  self
56
65
  ) -> int:
57
66
  """
58
- Get the timestamp when the application started.
67
+ Retrieve the application startup timestamp.
59
68
 
60
69
  Returns
61
70
  -------
62
71
  int
63
- The start time in nanoseconds since epoch
72
+ The timestamp in nanoseconds since Unix epoch when the application
73
+ instance was initialized.
64
74
  """
65
75
  return self.__startAt
66
76
 
@@ -68,10 +78,17 @@ class Application(Container, IApplication):
68
78
  self
69
79
  ) -> None:
70
80
  """
71
- Initialize the Application container.
81
+ Initialize the Application container with default configuration.
82
+
83
+ Sets up the initial application state including empty service providers list,
84
+ configuration storage, and boot status. Implements singleton pattern to
85
+ prevent multiple initializations of the same application instance.
72
86
 
73
- Sets up initial state including empty providers list and booted flag.
74
- Uses singleton pattern to prevent multiple initializations.
87
+ Notes
88
+ -----
89
+ The initialization process records the startup timestamp, initializes internal
90
+ data structures for providers and configurators, and sets the application
91
+ boot status to False until explicitly booted via the create() method.
75
92
  """
76
93
 
77
94
  # Initialize base container with application paths
@@ -108,7 +125,18 @@ class Application(Container, IApplication):
108
125
  self
109
126
  ) -> None:
110
127
  """
111
- Load and register core framework kernels.
128
+ Load and register essential framework kernels into the container.
129
+
130
+ This method imports and instantiates core framework kernels including the
131
+ TestKernel for testing functionality and KernelCLI for command-line interface
132
+ operations. Each kernel is registered as a singleton instance in the
133
+ application container for later retrieval and use.
134
+
135
+ Notes
136
+ -----
137
+ This is a private method called during application bootstrapping to ensure
138
+ core framework functionality is available before user-defined providers
139
+ are loaded.
112
140
  """
113
141
 
114
142
  # Import core framework kernels
@@ -129,9 +157,19 @@ class Application(Container, IApplication):
129
157
  self
130
158
  ) -> None:
131
159
  """
132
- Load core framework service providers.
160
+ Load and register core framework service providers.
161
+
162
+ This method imports and adds essential service providers required for
163
+ framework operation including console functionality, dumping utilities,
164
+ path resolution, progress bars, workers, logging, and testing capabilities.
165
+ These providers form the foundation layer of the framework's service
166
+ architecture.
133
167
 
134
- Registers essential providers required for framework operation
168
+ Notes
169
+ -----
170
+ This is a private method executed during application bootstrapping to
171
+ ensure core framework services are available before any user-defined
172
+ providers are registered.
135
173
  """
136
174
  # Import core framework providers
137
175
  from orionis.foundation.providers.console_provider import ConsoleProvider
@@ -166,17 +204,29 @@ class Application(Container, IApplication):
166
204
  providers: List[Type[IServiceProvider]] = []
167
205
  ) -> 'Application':
168
206
  """
169
- Add multiple service providers to the application.
207
+ Register multiple service providers with the application.
208
+
209
+ This method provides a convenient way to add multiple service provider
210
+ classes to the application in a single call. Each provider in the list
211
+ will be validated and added to the internal providers collection.
170
212
 
171
213
  Parameters
172
214
  ----------
173
215
  providers : List[Type[IServiceProvider]], optional
174
- List of provider classes to add to the application
216
+ A list of service provider classes that implement IServiceProvider
217
+ interface. Each provider will be added to the application's provider
218
+ registry. Default is an empty list.
175
219
 
176
220
  Returns
177
221
  -------
178
222
  Application
179
- The application instance for method chaining
223
+ The current application instance to enable method chaining.
224
+
225
+ Notes
226
+ -----
227
+ This method iterates through the provided list and calls addProvider()
228
+ for each provider class, which performs individual validation and
229
+ registration.
180
230
  """
181
231
 
182
232
  # Add each provider class
@@ -191,22 +241,34 @@ class Application(Container, IApplication):
191
241
  provider: Type[IServiceProvider]
192
242
  ) -> 'Application':
193
243
  """
194
- Add a single service provider to the application.
244
+ Register a single service provider with the application.
245
+
246
+ This method validates and adds a service provider class to the application's
247
+ provider registry. The provider must implement the IServiceProvider interface
248
+ and will be checked for duplicates before registration.
195
249
 
196
250
  Parameters
197
251
  ----------
198
252
  provider : Type[IServiceProvider]
199
- The provider class to add to the application
253
+ A service provider class that implements the IServiceProvider interface.
254
+ The class will be instantiated and registered during the application
255
+ bootstrap process.
200
256
 
201
257
  Returns
202
258
  -------
203
259
  Application
204
- The application instance for method chaining
260
+ The current application instance to enable method chaining.
205
261
 
206
262
  Raises
207
263
  ------
208
264
  OrionisTypeError
209
- If provider is not a subclass of IServiceProvider
265
+ If the provider parameter is not a class type or does not implement
266
+ the IServiceProvider interface, or if the provider is already registered.
267
+
268
+ Notes
269
+ -----
270
+ Providers are stored as class references and will be instantiated during
271
+ the registration phase of the application bootstrap process.
210
272
  """
211
273
 
212
274
  # Validate provider type
@@ -228,10 +290,19 @@ class Application(Container, IApplication):
228
290
  self
229
291
  ) -> None:
230
292
  """
231
- Register all added service providers.
293
+ Instantiate and register all service providers in the container.
294
+
295
+ This method iterates through all added provider classes, instantiates them
296
+ with the current application instance, and calls their register() method
297
+ to bind services into the dependency injection container. Supports both
298
+ synchronous and asynchronous registration methods.
232
299
 
233
- Calls the register method on each provider to bind services
234
- into the container.
300
+ Notes
301
+ -----
302
+ This is a private method called during application bootstrapping. After
303
+ registration, the providers list is updated to contain instantiated provider
304
+ objects rather than class references. The method handles both coroutine
305
+ and regular register methods using asyncio when necessary.
235
306
  """
236
307
 
237
308
  # Ensure providers list is empty before registration
@@ -260,10 +331,20 @@ class Application(Container, IApplication):
260
331
  self
261
332
  ) -> None:
262
333
  """
263
- Boot all registered service providers.
334
+ Execute the boot process for all registered service providers.
335
+
336
+ This method calls the boot() method on each instantiated service provider
337
+ to initialize services after all providers have been registered. This
338
+ two-phase process ensures all dependencies are available before any
339
+ provider attempts to use them. Supports both synchronous and asynchronous
340
+ boot methods.
264
341
 
265
- Calls the boot method on each provider to initialize services
266
- after all providers have been registered.
342
+ Notes
343
+ -----
344
+ This is a private method called during application bootstrapping after
345
+ provider registration is complete. After booting, the providers list is
346
+ deleted to prevent memory leaks since providers are no longer needed
347
+ after initialization.
267
348
  """
268
349
 
269
350
  # Iterate over each provider and boot it
@@ -305,38 +386,68 @@ class Application(Container, IApplication):
305
386
  testing : Testing | dict = Testing()
306
387
  ) -> 'Application':
307
388
  """
308
- Configure the application with various service configurators.
309
- This method allows you to set up different aspects of the application by providing
310
- configurator instances for various services like authentication, caching, database,
311
- etc. If no configurator is provided for a service, a default instance will be created.
389
+ Configure the application with comprehensive service configuration objects.
390
+
391
+ This method provides a centralized way to configure all major application
392
+ subsystems using either configuration entity instances or dictionary objects.
393
+ Each configurator manages settings for a specific aspect of the application
394
+ such as authentication, caching, database connectivity, logging, and more.
395
+
312
396
  Parameters
313
397
  ----------
314
- app : App, optional
315
- Application configurator instance. If None, creates a default App() instance.
316
- auth : Auth, optional
317
- Authentication configurator instance. If None, creates a default Auth() instance.
318
- cache : Cache, optional
319
- Cache configurator instance. If None, creates a default Cache() instance.
320
- cors : Cors, optional
321
- CORS configurator instance. If None, creates a default Cors() instance.
322
- database : Database, optional
323
- Database configurator instance. If None, creates a default Database() instance.
324
- filesystems : Filesystems, optional
325
- Filesystems configurator instance. If None, creates a default Filesystems() instance.
326
- logging : Logging, optional
327
- Logging configurator instance. If None, creates a default Logging() instance.
328
- mail : Mail, optional
329
- Mail configurator instance. If None, creates a default Mail() instance.
330
- queue : Queue, optional
331
- Queue configurator instance. If None, creates a default Queue() instance.
332
- session : Session, optional
333
- Session configurator instance. If None, creates a default Session() instance.
334
- testing : Testing, optional
335
- Testing configurator instance. If None, creates a default Testing() instance.
398
+ app : App or dict, optional
399
+ Application-level configuration including name, environment, debug settings,
400
+ and URL configuration. Default creates a new App() instance.
401
+ auth : Auth or dict, optional
402
+ Authentication system configuration including guards, providers, and
403
+ password settings. Default creates a new Auth() instance.
404
+ cache : Cache or dict, optional
405
+ Caching system configuration including default store, prefix settings,
406
+ and driver-specific options. Default creates a new Cache() instance.
407
+ cors : Cors or dict, optional
408
+ Cross-Origin Resource Sharing configuration including allowed origins,
409
+ methods, and headers. Default creates a new Cors() instance.
410
+ database : Database or dict, optional
411
+ Database connectivity configuration including default connection, migration
412
+ settings, and connection definitions. Default creates a new Database() instance.
413
+ filesystems : Filesystems or dict, optional
414
+ File storage system configuration including default disk, cloud storage
415
+ settings, and disk definitions. Default creates a new Filesystems() instance.
416
+ logging : Logging or dict, optional
417
+ Logging system configuration including default channel, log levels,
418
+ and channel definitions. Default creates a new Logging() instance.
419
+ mail : Mail or dict, optional
420
+ Email system configuration including default mailer, transport settings,
421
+ and mailer definitions. Default creates a new Mail() instance.
422
+ path : Paths or dict, optional
423
+ Application path configuration including directories for controllers,
424
+ models, views, and other application components. Default creates a new Paths() instance.
425
+ queue : Queue or dict, optional
426
+ Queue system configuration including default connection, worker settings,
427
+ and connection definitions. Default creates a new Queue() instance.
428
+ session : Session or dict, optional
429
+ Session management configuration including driver, lifetime, encryption,
430
+ and storage settings. Default creates a new Session() instance.
431
+ testing : Testing or dict, optional
432
+ Testing framework configuration including database settings, environment
433
+ variables, and test-specific options. Default creates a new Testing() instance.
434
+
336
435
  Returns
337
436
  -------
338
437
  Application
339
- Returns self to allow method chaining.
438
+ The current application instance to enable method chaining.
439
+
440
+ Raises
441
+ ------
442
+ OrionisTypeError
443
+ If any configurator parameter is not an instance of its expected type
444
+ or a dictionary that can be converted to the expected type.
445
+
446
+ Notes
447
+ -----
448
+ Each configurator is validated for type correctness and then passed to its
449
+ corresponding load method for processing and storage in the application's
450
+ configuration system.
340
451
  """
341
452
 
342
453
  # Load app configurator
@@ -407,18 +518,28 @@ class Application(Container, IApplication):
407
518
  **app_config
408
519
  ) -> 'Application':
409
520
  """
410
- Configure the application with various settings.
521
+ Configure the application using keyword arguments.
522
+
523
+ This method provides a convenient way to set application configuration
524
+ by passing individual configuration parameters as keyword arguments.
525
+ The parameters are used to create an App configuration instance.
411
526
 
412
527
  Parameters
413
528
  ----------
414
529
  **app_config : dict
415
- Configuration parameters for the application. Must match the fields
416
- expected by the App dataclass (orionis.foundation.config.app.entities.app.App).
530
+ Configuration parameters for the application. These must match the
531
+ field names and types expected by the App dataclass from
532
+ orionis.foundation.config.app.entities.app.App.
417
533
 
418
534
  Returns
419
535
  -------
420
536
  Application
421
- The application instance for method chaining
537
+ The current application instance to enable method chaining.
538
+
539
+ Notes
540
+ -----
541
+ This method internally creates an App instance from the provided keyword
542
+ arguments and then calls loadConfigApp() to store the configuration.
422
543
  """
423
544
 
424
545
  # Create App instance with provided parameters
@@ -435,17 +556,33 @@ class Application(Container, IApplication):
435
556
  app: App | dict
436
557
  ) -> 'Application':
437
558
  """
438
- Load the application configuration from an App instance.
559
+ Load and store application configuration from an App instance or dictionary.
560
+
561
+ This method validates and stores the application configuration in the
562
+ internal configurators storage. If a dictionary is provided, it will
563
+ be converted to an App instance before storage.
439
564
 
440
565
  Parameters
441
566
  ----------
442
- config : App | dict
443
- The App instance or dictionary containing application configuration.
567
+ app : App or dict
568
+ The application configuration as either an App instance or a dictionary
569
+ containing configuration parameters that can be used to construct an
570
+ App instance.
444
571
 
445
572
  Returns
446
573
  -------
447
574
  Application
448
- The application instance for method chaining
575
+ The current application instance to enable method chaining.
576
+
577
+ Raises
578
+ ------
579
+ OrionisTypeError
580
+ If the app parameter is not an instance of App or a dictionary.
581
+
582
+ Notes
583
+ -----
584
+ Dictionary inputs are automatically converted to App instances using
585
+ the dictionary unpacking operator (**app).
449
586
  """
450
587
 
451
588
  # Validate app type
@@ -467,18 +604,28 @@ class Application(Container, IApplication):
467
604
  **auth_config
468
605
  ) -> 'Application':
469
606
  """
470
- Configure the authentication with various settings.
607
+ Configure the authentication system using keyword arguments.
608
+
609
+ This method provides a convenient way to set authentication configuration
610
+ by passing individual configuration parameters as keyword arguments.
611
+ The parameters are used to create an Auth configuration instance.
471
612
 
472
613
  Parameters
473
614
  ----------
474
615
  **auth_config : dict
475
- Configuration parameters for authentication. Must match the fields
476
- expected by the Auth dataclass (orionis.foundation.config.auth.entities.auth.Auth).
616
+ Configuration parameters for authentication. These must match the
617
+ field names and types expected by the Auth dataclass from
618
+ orionis.foundation.config.auth.entities.auth.Auth.
477
619
 
478
620
  Returns
479
621
  -------
480
622
  Application
481
- The application instance for method chaining
623
+ The current application instance to enable method chaining.
624
+
625
+ Notes
626
+ -----
627
+ This method internally creates an Auth instance from the provided keyword
628
+ arguments and then calls loadConfigAuth() to store the configuration.
482
629
  """
483
630
 
484
631
  # Create Auth instance with provided parameters
@@ -495,17 +642,33 @@ class Application(Container, IApplication):
495
642
  auth: Auth | dict
496
643
  ) -> 'Application':
497
644
  """
498
- Load the application authentication configuration from an Auth instance.
645
+ Load and store authentication configuration from an Auth instance or dictionary.
646
+
647
+ This method validates and stores the authentication configuration in the
648
+ internal configurators storage. If a dictionary is provided, it will
649
+ be converted to an Auth instance before storage.
499
650
 
500
651
  Parameters
501
652
  ----------
502
- auth : Auth | dict
503
- The Auth instance or dictionary containing authentication configuration.
653
+ auth : Auth or dict
654
+ The authentication configuration as either an Auth instance or a dictionary
655
+ containing configuration parameters that can be used to construct an
656
+ Auth instance.
504
657
 
505
658
  Returns
506
659
  -------
507
660
  Application
508
- The application instance for method chaining
661
+ The current application instance to enable method chaining.
662
+
663
+ Raises
664
+ ------
665
+ OrionisTypeError
666
+ If the auth parameter is not an instance of Auth or a dictionary.
667
+
668
+ Notes
669
+ -----
670
+ Dictionary inputs are automatically converted to Auth instances using
671
+ the dictionary unpacking operator (**auth).
509
672
  """
510
673
 
511
674
  # Validate auth type
@@ -527,18 +690,28 @@ class Application(Container, IApplication):
527
690
  **cache_config
528
691
  ) -> 'Application':
529
692
  """
530
- Configure the cache with various settings.
693
+ Configure the cache system using keyword arguments.
694
+
695
+ This method provides a convenient way to set cache configuration by
696
+ passing individual configuration parameters as keyword arguments.
697
+ The parameters are used to create a Cache configuration instance.
531
698
 
532
699
  Parameters
533
700
  ----------
534
701
  **cache_config : dict
535
- Configuration parameters for cache. Must match the fields
536
- expected by the Cache dataclass (orionis.foundation.config.cache.entities.cache.Cache).
702
+ Configuration parameters for the cache system. These must match the
703
+ field names and types expected by the Cache dataclass from
704
+ orionis.foundation.config.cache.entities.cache.Cache.
537
705
 
538
706
  Returns
539
707
  -------
540
708
  Application
541
- The application instance for method chaining
709
+ The current application instance to enable method chaining.
710
+
711
+ Notes
712
+ -----
713
+ This method internally creates a Cache instance from the provided keyword
714
+ arguments and then calls loadConfigCache() to store the configuration.
542
715
  """
543
716
 
544
717
  # Create Cache instance with provided parameters
@@ -555,17 +728,33 @@ class Application(Container, IApplication):
555
728
  cache: Cache | dict
556
729
  ) -> 'Application':
557
730
  """
558
- Load the application cache configuration from a Cache instance.
731
+ Load and store cache configuration from a Cache instance or dictionary.
732
+
733
+ This method validates and stores the cache configuration in the
734
+ internal configurators storage. If a dictionary is provided, it will
735
+ be converted to a Cache instance before storage.
559
736
 
560
737
  Parameters
561
738
  ----------
562
- cache : Cache | dict
563
- The Cache instance or dictionary containing cache configuration.
739
+ cache : Cache or dict
740
+ The cache configuration as either a Cache instance or a dictionary
741
+ containing configuration parameters that can be used to construct a
742
+ Cache instance.
564
743
 
565
744
  Returns
566
745
  -------
567
746
  Application
568
- The application instance for method chaining
747
+ The current application instance to enable method chaining.
748
+
749
+ Raises
750
+ ------
751
+ OrionisTypeError
752
+ If the cache parameter is not an instance of Cache or a dictionary.
753
+
754
+ Notes
755
+ -----
756
+ Dictionary inputs are automatically converted to Cache instances using
757
+ the dictionary unpacking operator (**cache).
569
758
  """
570
759
 
571
760
  # Validate cache type
@@ -587,18 +776,28 @@ class Application(Container, IApplication):
587
776
  **cors_config
588
777
  ) -> 'Application':
589
778
  """
590
- Configure the CORS with various settings.
779
+ Configure the CORS (Cross-Origin Resource Sharing) system using keyword arguments.
780
+
781
+ This method provides a convenient way to set CORS configuration by
782
+ passing individual configuration parameters as keyword arguments.
783
+ The parameters are used to create a Cors configuration instance.
591
784
 
592
785
  Parameters
593
786
  ----------
594
787
  **cors_config : dict
595
- Configuration parameters for CORS. Must match the fields
596
- expected by the Cors dataclass (orionis.foundation.config.cors.entities.cors.Cors).
788
+ Configuration parameters for CORS settings. These must match the
789
+ field names and types expected by the Cors dataclass from
790
+ orionis.foundation.config.cors.entities.cors.Cors.
597
791
 
598
792
  Returns
599
793
  -------
600
794
  Application
601
- The application instance for method chaining
795
+ The current application instance to enable method chaining.
796
+
797
+ Notes
798
+ -----
799
+ This method internally creates a Cors instance from the provided keyword
800
+ arguments and then calls loadConfigCors() to store the configuration.
602
801
  """
603
802
 
604
803
  # Create Cors instance with provided parameters
@@ -615,17 +814,33 @@ class Application(Container, IApplication):
615
814
  cors: Cors | dict
616
815
  ) -> 'Application':
617
816
  """
618
- Load the application CORS configuration from a Cors instance.
817
+ Load and store CORS configuration from a Cors instance or dictionary.
818
+
819
+ This method validates and stores the CORS (Cross-Origin Resource Sharing)
820
+ configuration in the internal configurators storage. If a dictionary is
821
+ provided, it will be converted to a Cors instance before storage.
619
822
 
620
823
  Parameters
621
824
  ----------
622
- cors : Cors | dict
623
- The Cors instance or dictionary containing CORS configuration.
825
+ cors : Cors or dict
826
+ The CORS configuration as either a Cors instance or a dictionary
827
+ containing configuration parameters that can be used to construct a
828
+ Cors instance.
624
829
 
625
830
  Returns
626
831
  -------
627
832
  Application
628
- The application instance for method chaining
833
+ The current application instance to enable method chaining.
834
+
835
+ Raises
836
+ ------
837
+ OrionisTypeError
838
+ If the cors parameter is not an instance of Cors or a dictionary.
839
+
840
+ Notes
841
+ -----
842
+ Dictionary inputs are automatically converted to Cors instances using
843
+ the dictionary unpacking operator (**cors).
629
844
  """
630
845
 
631
846
  # Validate cors type
@@ -647,18 +862,28 @@ class Application(Container, IApplication):
647
862
  **database_config
648
863
  ) -> 'Application':
649
864
  """
650
- Configure the database with various settings.
865
+ Configure the database system using keyword arguments.
866
+
867
+ This method provides a convenient way to set database configuration by
868
+ passing individual configuration parameters as keyword arguments.
869
+ The parameters are used to create a Database configuration instance.
651
870
 
652
871
  Parameters
653
872
  ----------
654
873
  **database_config : dict
655
- Configuration parameters for database. Must match the fields
656
- expected by the Database dataclass (orionis.foundation.config.database.entities.database.Database).
874
+ Configuration parameters for the database system. These must match the
875
+ field names and types expected by the Database dataclass from
876
+ orionis.foundation.config.database.entities.database.Database.
657
877
 
658
878
  Returns
659
879
  -------
660
880
  Application
661
- The application instance for method chaining
881
+ The current application instance to enable method chaining.
882
+
883
+ Notes
884
+ -----
885
+ This method internally creates a Database instance from the provided keyword
886
+ arguments and then calls loadConfigDatabase() to store the configuration.
662
887
  """
663
888
 
664
889
  # Create Database instance with provided parameters
@@ -675,17 +900,33 @@ class Application(Container, IApplication):
675
900
  database: Database | dict
676
901
  ) -> 'Application':
677
902
  """
678
- Load the application database configuration from a Database instance.
903
+ Load and store database configuration from a Database instance or dictionary.
904
+
905
+ This method validates and stores the database configuration in the
906
+ internal configurators storage. If a dictionary is provided, it will
907
+ be converted to a Database instance before storage.
679
908
 
680
909
  Parameters
681
910
  ----------
682
- database : Database | dict
683
- The Database instance or dictionary containing database configuration.
911
+ database : Database or dict
912
+ The database configuration as either a Database instance or a dictionary
913
+ containing configuration parameters that can be used to construct a
914
+ Database instance.
684
915
 
685
916
  Returns
686
917
  -------
687
918
  Application
688
- The application instance for method chaining
919
+ The current application instance to enable method chaining.
920
+
921
+ Raises
922
+ ------
923
+ OrionisTypeError
924
+ If the database parameter is not an instance of Database or a dictionary.
925
+
926
+ Notes
927
+ -----
928
+ Dictionary inputs are automatically converted to Database instances using
929
+ the dictionary unpacking operator (**database).
689
930
  """
690
931
 
691
932
  # Validate database type
@@ -707,18 +948,28 @@ class Application(Container, IApplication):
707
948
  **filesystems_config
708
949
  ) -> 'Application':
709
950
  """
710
- Configure the filesystems with various settings.
951
+ Configure the filesystems using keyword arguments.
952
+
953
+ This method provides a convenient way to set filesystem configuration by
954
+ passing individual configuration parameters as keyword arguments.
955
+ The parameters are used to create a Filesystems configuration instance.
711
956
 
712
957
  Parameters
713
958
  ----------
714
959
  **filesystems_config : dict
715
- Configuration parameters for filesystems. Must match the fields
716
- expected by the Filesystems dataclass (orionis.foundation.config.filesystems.entitites.filesystems.Filesystems).
960
+ Configuration parameters for the filesystems. These must match the
961
+ field names and types expected by the Filesystems dataclass from
962
+ orionis.foundation.config.filesystems.entitites.filesystems.Filesystems.
717
963
 
718
964
  Returns
719
965
  -------
720
966
  Application
721
- The application instance for method chaining
967
+ The current application instance to enable method chaining.
968
+
969
+ Notes
970
+ -----
971
+ This method internally creates a Filesystems instance from the provided keyword
972
+ arguments and then calls loadConfigFilesystems() to store the configuration.
722
973
  """
723
974
 
724
975
  # Create Filesystems instance with provided parameters
@@ -735,17 +986,33 @@ class Application(Container, IApplication):
735
986
  filesystems: Filesystems | dict
736
987
  ) -> 'Application':
737
988
  """
738
- Load the application filesystems configuration from a Filesystems instance.
989
+ Load and store filesystems configuration from a Filesystems instance or dictionary.
990
+
991
+ This method validates and stores the filesystems configuration in the
992
+ internal configurators storage. If a dictionary is provided, it will
993
+ be converted to a Filesystems instance before storage.
739
994
 
740
995
  Parameters
741
996
  ----------
742
- filesystems : Filesystems | dict
743
- The Filesystems instance or dictionary containing filesystems configuration.
997
+ filesystems : Filesystems or dict
998
+ The filesystems configuration as either a Filesystems instance or a dictionary
999
+ containing configuration parameters that can be used to construct a
1000
+ Filesystems instance.
744
1001
 
745
1002
  Returns
746
1003
  -------
747
1004
  Application
748
- The application instance for method chaining
1005
+ The current application instance to enable method chaining.
1006
+
1007
+ Raises
1008
+ ------
1009
+ OrionisTypeError
1010
+ If the filesystems parameter is not an instance of Filesystems or a dictionary.
1011
+
1012
+ Notes
1013
+ -----
1014
+ Dictionary inputs are automatically converted to Filesystems instances using
1015
+ the dictionary unpacking operator (**filesystems).
749
1016
  """
750
1017
 
751
1018
  # Validate filesystems type
@@ -767,18 +1034,28 @@ class Application(Container, IApplication):
767
1034
  **logging_config
768
1035
  ) -> 'Application':
769
1036
  """
770
- Configure the logging system with various channel settings.
1037
+ Configure the logging system using keyword arguments.
1038
+
1039
+ This method provides a convenient way to set logging configuration by
1040
+ passing individual configuration parameters as keyword arguments.
1041
+ The parameters are used to create a Logging configuration instance.
771
1042
 
772
1043
  Parameters
773
1044
  ----------
774
1045
  **logging_config : dict
775
- Configuration parameters for logging. Must match the fields
776
- expected by the Logging dataclass (orionis.foundation.config.logging.entities.logging.Logging).
1046
+ Configuration parameters for the logging system. These must match the
1047
+ field names and types expected by the Logging dataclass from
1048
+ orionis.foundation.config.logging.entities.logging.Logging.
777
1049
 
778
1050
  Returns
779
1051
  -------
780
1052
  Application
781
- The application instance for method chaining
1053
+ The current application instance to enable method chaining.
1054
+
1055
+ Notes
1056
+ -----
1057
+ This method internally creates a Logging instance from the provided keyword
1058
+ arguments and then calls loadConfigLogging() to store the configuration.
782
1059
  """
783
1060
 
784
1061
  # Create Logging instance with provided parameters
@@ -795,17 +1072,33 @@ class Application(Container, IApplication):
795
1072
  logging: Logging | dict
796
1073
  ) -> 'Application':
797
1074
  """
798
- Load the application logging configuration from a Logging instance.
1075
+ Load and store logging configuration from a Logging instance or dictionary.
1076
+
1077
+ This method validates and stores the logging configuration in the
1078
+ internal configurators storage. If a dictionary is provided, it will
1079
+ be converted to a Logging instance before storage.
799
1080
 
800
1081
  Parameters
801
1082
  ----------
802
- logging : Logging | dict
803
- The Logging instance or dictionary containing logging configuration.
1083
+ logging : Logging or dict
1084
+ The logging configuration as either a Logging instance or a dictionary
1085
+ containing configuration parameters that can be used to construct a
1086
+ Logging instance.
804
1087
 
805
1088
  Returns
806
1089
  -------
807
1090
  Application
808
- The application instance for method chaining
1091
+ The current application instance to enable method chaining.
1092
+
1093
+ Raises
1094
+ ------
1095
+ OrionisTypeError
1096
+ If the logging parameter is not an instance of Logging or a dictionary.
1097
+
1098
+ Notes
1099
+ -----
1100
+ Dictionary inputs are automatically converted to Logging instances using
1101
+ the dictionary unpacking operator (**logging).
809
1102
  """
810
1103
 
811
1104
  # Validate logging type
@@ -827,18 +1120,28 @@ class Application(Container, IApplication):
827
1120
  **mail_config
828
1121
  ) -> 'Application':
829
1122
  """
830
- Configure the mail system with various settings.
1123
+ Configure the mail system using keyword arguments.
1124
+
1125
+ This method provides a convenient way to set mail configuration by
1126
+ passing individual configuration parameters as keyword arguments.
1127
+ The parameters are used to create a Mail configuration instance.
831
1128
 
832
1129
  Parameters
833
1130
  ----------
834
1131
  **mail_config : dict
835
- Configuration parameters for mail. Must match the fields
836
- expected by the Mail dataclass (orionis.foundation.config.mail.entities.mail.Mail).
1132
+ Configuration parameters for the mail system. These must match the
1133
+ field names and types expected by the Mail dataclass from
1134
+ orionis.foundation.config.mail.entities.mail.Mail.
837
1135
 
838
1136
  Returns
839
1137
  -------
840
1138
  Application
841
- The application instance for method chaining
1139
+ The current application instance to enable method chaining.
1140
+
1141
+ Notes
1142
+ -----
1143
+ This method internally creates a Mail instance from the provided keyword
1144
+ arguments and then calls loadConfigMail() to store the configuration.
842
1145
  """
843
1146
 
844
1147
  # Create Mail instance with provided parameters
@@ -855,17 +1158,33 @@ class Application(Container, IApplication):
855
1158
  mail: Mail | dict
856
1159
  ) -> 'Application':
857
1160
  """
858
- Load the application mail configuration from a Mail instance.
1161
+ Load and store mail configuration from a Mail instance or dictionary.
1162
+
1163
+ This method validates and stores the mail configuration in the
1164
+ internal configurators storage. If a dictionary is provided, it will
1165
+ be converted to a Mail instance before storage.
859
1166
 
860
1167
  Parameters
861
1168
  ----------
862
- mail : Mail | dict
863
- The Mail instance or dictionary containing mail configuration.
1169
+ mail : Mail or dict
1170
+ The mail configuration as either a Mail instance or a dictionary
1171
+ containing configuration parameters that can be used to construct a
1172
+ Mail instance.
864
1173
 
865
1174
  Returns
866
1175
  -------
867
1176
  Application
868
- The application instance for method chaining
1177
+ The current application instance to enable method chaining.
1178
+
1179
+ Raises
1180
+ ------
1181
+ OrionisTypeError
1182
+ If the mail parameter is not an instance of Mail or a dictionary.
1183
+
1184
+ Notes
1185
+ -----
1186
+ Dictionary inputs are automatically converted to Mail instances using
1187
+ the dictionary unpacking operator (**mail).
869
1188
  """
870
1189
 
871
1190
  # Validate mail type
@@ -918,16 +1237,88 @@ class Application(Container, IApplication):
918
1237
  storage_testing: str | Path = (Path.cwd() / 'storage' / 'framework' / 'testing').resolve(),
919
1238
  ) -> 'Application':
920
1239
  """
921
- Set various application paths.
1240
+ Configure application directory paths using keyword arguments.
1241
+
1242
+ This method allows customization of all application directory paths including
1243
+ console components, HTTP components, application layers, resources, routes,
1244
+ database files, and storage locations. All paths are resolved to absolute
1245
+ paths and stored as strings in the configuration.
922
1246
 
923
1247
  Parameters
924
1248
  ----------
925
- Each keyword argument sets a specific application path.
1249
+ console_scheduler : str or Path, optional
1250
+ Path to the console kernel/scheduler file. Default is 'app/console/kernel.py'.
1251
+ console_commands : str or Path, optional
1252
+ Directory path for console command classes. Default is 'app/console/commands'.
1253
+ http_controllers : str or Path, optional
1254
+ Directory path for HTTP controller classes. Default is 'app/http/controllers'.
1255
+ http_middleware : str or Path, optional
1256
+ Directory path for HTTP middleware classes. Default is 'app/http/middleware'.
1257
+ http_requests : str or Path, optional
1258
+ Directory path for HTTP request classes. Default is 'app/http/requests'.
1259
+ models : str or Path, optional
1260
+ Directory path for data model classes. Default is 'app/models'.
1261
+ providers : str or Path, optional
1262
+ Directory path for service provider classes. Default is 'app/providers'.
1263
+ events : str or Path, optional
1264
+ Directory path for event classes. Default is 'app/events'.
1265
+ listeners : str or Path, optional
1266
+ Directory path for event listener classes. Default is 'app/listeners'.
1267
+ notifications : str or Path, optional
1268
+ Directory path for notification classes. Default is 'app/notifications'.
1269
+ jobs : str or Path, optional
1270
+ Directory path for queue job classes. Default is 'app/jobs'.
1271
+ policies : str or Path, optional
1272
+ Directory path for authorization policy classes. Default is 'app/policies'.
1273
+ exceptions : str or Path, optional
1274
+ Directory path for custom exception classes. Default is 'app/exceptions'.
1275
+ services : str or Path, optional
1276
+ Directory path for application service classes. Default is 'app/services'.
1277
+ views : str or Path, optional
1278
+ Directory path for view templates. Default is 'resources/views'.
1279
+ lang : str or Path, optional
1280
+ Directory path for language files. Default is 'resources/lang'.
1281
+ assets : str or Path, optional
1282
+ Directory path for asset files. Default is 'resources/assets'.
1283
+ routes_web : str or Path, optional
1284
+ File path for web route definitions. Default is 'routes/web.py'.
1285
+ routes_api : str or Path, optional
1286
+ File path for API route definitions. Default is 'routes/api.py'.
1287
+ routes_console : str or Path, optional
1288
+ File path for console route definitions. Default is 'routes/console.py'.
1289
+ routes_channels : str or Path, optional
1290
+ File path for broadcast channel definitions. Default is 'routes/channels.py'.
1291
+ config : str or Path, optional
1292
+ Directory path for configuration files. Default is 'config'.
1293
+ migrations : str or Path, optional
1294
+ Directory path for database migration files. Default is 'database/migrations'.
1295
+ seeders : str or Path, optional
1296
+ Directory path for database seeder files. Default is 'database/seeders'.
1297
+ factories : str or Path, optional
1298
+ Directory path for model factory files. Default is 'database/factories'.
1299
+ storage_logs : str or Path, optional
1300
+ Directory path for log file storage. Default is 'storage/logs'.
1301
+ storage_framework : str or Path, optional
1302
+ Directory path for framework storage. Default is 'storage/framework'.
1303
+ storage_sessions : str or Path, optional
1304
+ Directory path for session file storage. Default is 'storage/framework/sessions'.
1305
+ storage_cache : str or Path, optional
1306
+ Directory path for cache file storage. Default is 'storage/framework/cache'.
1307
+ storage_views : str or Path, optional
1308
+ Directory path for compiled view storage. Default is 'storage/framework/views'.
1309
+ storage_testing : str or Path, optional
1310
+ Directory path for testing file storage. Default is 'storage/framework/testing'.
926
1311
 
927
1312
  Returns
928
1313
  -------
929
1314
  Application
930
- The application instance for method chaining
1315
+ The current application instance to enable method chaining.
1316
+
1317
+ Notes
1318
+ -----
1319
+ All path parameters accept either string or Path objects and are automatically
1320
+ resolved to absolute paths relative to the current working directory. The
1321
+ resolved paths are stored as strings in the internal configuration system.
931
1322
  """
932
1323
 
933
1324
  # Ensure 'paths' exists in configurators
@@ -973,22 +1364,33 @@ class Application(Container, IApplication):
973
1364
  paths: Paths | dict
974
1365
  ) -> 'Application':
975
1366
  """
976
- Load the application paths configuration from a Paths instance or dictionary.
1367
+ Load and store path configuration from a Paths instance or dictionary.
1368
+
1369
+ This method validates and stores the application path configuration in the
1370
+ internal configurators storage. If a dictionary is provided, it will be
1371
+ converted to a Paths instance before storage.
977
1372
 
978
1373
  Parameters
979
1374
  ----------
980
- paths : Paths | dict
981
- The Paths instance or dictionary containing path configuration.
1375
+ paths : Paths or dict
1376
+ The path configuration as either a Paths instance or a dictionary
1377
+ containing path parameters that can be used to construct a Paths instance.
982
1378
 
983
1379
  Returns
984
1380
  -------
985
1381
  Application
986
- The application instance for method chaining
1382
+ The current application instance to enable method chaining.
987
1383
 
988
1384
  Raises
989
1385
  ------
990
1386
  OrionisTypeError
991
- If paths is not an instance of Paths or dict.
1387
+ If the paths parameter is not an instance of Paths or a dictionary.
1388
+
1389
+ Notes
1390
+ -----
1391
+ Dictionary inputs are automatically converted to Paths instances using
1392
+ the dictionary unpacking operator (**paths). This method is used internally
1393
+ by withConfigurators() and can be called directly for path configuration.
992
1394
  """
993
1395
 
994
1396
  # Validate paths type
@@ -1010,18 +1412,28 @@ class Application(Container, IApplication):
1010
1412
  **queue_config
1011
1413
  ) -> 'Application':
1012
1414
  """
1013
- Configure the queue system with various settings.
1415
+ Configure the queue system using keyword arguments.
1416
+
1417
+ This method provides a convenient way to set queue configuration by
1418
+ passing individual configuration parameters as keyword arguments.
1419
+ The parameters are used to create a Queue configuration instance.
1014
1420
 
1015
1421
  Parameters
1016
1422
  ----------
1017
1423
  **queue_config : dict
1018
- Configuration parameters for queue. Must match the fields
1019
- expected by the Queue dataclass (orionis.foundation.config.queue.entities.queue.Queue).
1424
+ Configuration parameters for the queue system. These must match the
1425
+ field names and types expected by the Queue dataclass from
1426
+ orionis.foundation.config.queue.entities.queue.Queue.
1020
1427
 
1021
1428
  Returns
1022
1429
  -------
1023
1430
  Application
1024
- The application instance for method chaining
1431
+ The current application instance to enable method chaining.
1432
+
1433
+ Notes
1434
+ -----
1435
+ This method internally creates a Queue instance from the provided keyword
1436
+ arguments and then calls loadConfigQueue() to store the configuration.
1025
1437
  """
1026
1438
 
1027
1439
  # Create Queue instance with provided parameters
@@ -1038,17 +1450,33 @@ class Application(Container, IApplication):
1038
1450
  queue: Queue | dict
1039
1451
  ) -> 'Application':
1040
1452
  """
1041
- Load the application queue configuration from a Queue instance.
1453
+ Load and store queue configuration from a Queue instance or dictionary.
1454
+
1455
+ This method validates and stores the queue configuration in the
1456
+ internal configurators storage. If a dictionary is provided, it will
1457
+ be converted to a Queue instance before storage.
1042
1458
 
1043
1459
  Parameters
1044
1460
  ----------
1045
- queue : Queue
1046
- The Queue instance containing queue configuration
1461
+ queue : Queue or dict
1462
+ The queue configuration as either a Queue instance or a dictionary
1463
+ containing configuration parameters that can be used to construct a
1464
+ Queue instance.
1047
1465
 
1048
1466
  Returns
1049
1467
  -------
1050
1468
  Application
1051
- The application instance for method chaining
1469
+ The current application instance to enable method chaining.
1470
+
1471
+ Raises
1472
+ ------
1473
+ OrionisTypeError
1474
+ If the queue parameter is not an instance of Queue or a dictionary.
1475
+
1476
+ Notes
1477
+ -----
1478
+ Dictionary inputs are automatically converted to Queue instances using
1479
+ the dictionary unpacking operator (**queue).
1052
1480
  """
1053
1481
 
1054
1482
  # Validate queue type
@@ -1070,18 +1498,28 @@ class Application(Container, IApplication):
1070
1498
  **session_config
1071
1499
  ) -> 'Application':
1072
1500
  """
1073
- Configure the session with various settings.
1501
+ Configure the session system using keyword arguments.
1502
+
1503
+ This method provides a convenient way to set session configuration by
1504
+ passing individual configuration parameters as keyword arguments.
1505
+ The parameters are used to create a Session configuration instance.
1074
1506
 
1075
1507
  Parameters
1076
1508
  ----------
1077
1509
  **session_config : dict
1078
- Configuration parameters for session. Must match the fields
1079
- expected by the Session dataclass (orionis.foundation.config.session.entities.session.Session).
1510
+ Configuration parameters for the session system. These must match the
1511
+ field names and types expected by the Session dataclass from
1512
+ orionis.foundation.config.session.entities.session.Session.
1080
1513
 
1081
1514
  Returns
1082
1515
  -------
1083
1516
  Application
1084
- The application instance for method chaining
1517
+ The current application instance to enable method chaining.
1518
+
1519
+ Notes
1520
+ -----
1521
+ This method internally creates a Session instance from the provided keyword
1522
+ arguments and then calls loadConfigSession() to store the configuration.
1085
1523
  """
1086
1524
 
1087
1525
  # Create Session instance with provided parameters
@@ -1098,17 +1536,33 @@ class Application(Container, IApplication):
1098
1536
  session: Session | dict
1099
1537
  ) -> 'Application':
1100
1538
  """
1101
- Load the application session configuration from a Session instance.
1539
+ Load and store session configuration from a Session instance or dictionary.
1540
+
1541
+ This method validates and stores the session configuration in the
1542
+ internal configurators storage. If a dictionary is provided, it will
1543
+ be converted to a Session instance before storage.
1102
1544
 
1103
1545
  Parameters
1104
1546
  ----------
1105
- session : Session | dict
1106
- The Session instance or dictionary containing session configuration.
1547
+ session : Session or dict
1548
+ The session configuration as either a Session instance or a dictionary
1549
+ containing configuration parameters that can be used to construct a
1550
+ Session instance.
1107
1551
 
1108
1552
  Returns
1109
1553
  -------
1110
1554
  Application
1111
- The application instance for method chaining
1555
+ The current application instance to enable method chaining.
1556
+
1557
+ Raises
1558
+ ------
1559
+ OrionisTypeError
1560
+ If the session parameter is not an instance of Session or a dictionary.
1561
+
1562
+ Notes
1563
+ -----
1564
+ Dictionary inputs are automatically converted to Session instances using
1565
+ the dictionary unpacking operator (**session).
1112
1566
  """
1113
1567
 
1114
1568
  # Validate session type
@@ -1130,18 +1584,28 @@ class Application(Container, IApplication):
1130
1584
  **testing_config
1131
1585
  ) -> 'Application':
1132
1586
  """
1133
- Configure the testing with various settings.
1587
+ Configure the testing framework using keyword arguments.
1588
+
1589
+ This method provides a convenient way to set testing configuration by
1590
+ passing individual configuration parameters as keyword arguments.
1591
+ The parameters are used to create a Testing configuration instance.
1134
1592
 
1135
1593
  Parameters
1136
1594
  ----------
1137
1595
  **testing_config : dict
1138
- Configuration parameters for testing. Must match the fields
1139
- expected by the Testing dataclass (orionis.foundation.config.testing.entities.testing.Testing).
1596
+ Configuration parameters for the testing framework. These must match the
1597
+ field names and types expected by the Testing dataclass from
1598
+ orionis.foundation.config.testing.entities.testing.Testing.
1140
1599
 
1141
1600
  Returns
1142
1601
  -------
1143
1602
  Application
1144
- The application instance for method chaining
1603
+ The current application instance to enable method chaining.
1604
+
1605
+ Notes
1606
+ -----
1607
+ This method internally creates a Testing instance from the provided keyword
1608
+ arguments and then calls loadConfigTesting() to store the configuration.
1145
1609
  """
1146
1610
 
1147
1611
  # Create Testing instance with provided parameters
@@ -1158,17 +1622,33 @@ class Application(Container, IApplication):
1158
1622
  testing: Testing | dict
1159
1623
  ) -> 'Application':
1160
1624
  """
1161
- Load the application testing configuration from a Testing instance.
1625
+ Load and store testing configuration from a Testing instance or dictionary.
1626
+
1627
+ This method validates and stores the testing framework configuration in the
1628
+ internal configurators storage. If a dictionary is provided, it will be
1629
+ converted to a Testing instance before storage.
1162
1630
 
1163
1631
  Parameters
1164
1632
  ----------
1165
- testing : Testing | dict
1166
- The Testing instance or dictionary containing testing configuration.
1633
+ testing : Testing or dict
1634
+ The testing configuration as either a Testing instance or a dictionary
1635
+ containing configuration parameters that can be used to construct a
1636
+ Testing instance.
1167
1637
 
1168
1638
  Returns
1169
1639
  -------
1170
1640
  Application
1171
- The application instance for method chaining
1641
+ The current application instance to enable method chaining.
1642
+
1643
+ Raises
1644
+ ------
1645
+ OrionisTypeError
1646
+ If the testing parameter is not an instance of Testing or a dictionary.
1647
+
1648
+ Notes
1649
+ -----
1650
+ Dictionary inputs are automatically converted to Testing instances using
1651
+ the dictionary unpacking operator (**testing).
1172
1652
  """
1173
1653
 
1174
1654
  # Validate testing type
@@ -1189,12 +1669,25 @@ class Application(Container, IApplication):
1189
1669
  self,
1190
1670
  ) -> None:
1191
1671
  """
1192
- Retrieve a configuration value by key.
1672
+ Initialize and load the application configuration from configurators.
1193
1673
 
1194
- Returns
1195
- -------
1196
- None
1197
- Initializes the application configuration if not already set.
1674
+ This private method processes all stored configurators and converts them
1675
+ into a unified configuration dictionary. If no custom configurators have
1676
+ been set, it initializes with default configuration values. The method
1677
+ handles the conversion from individual configurator instances to a flat
1678
+ configuration structure.
1679
+
1680
+ Raises
1681
+ ------
1682
+ OrionisRuntimeError
1683
+ If an error occurs during configuration loading or processing.
1684
+
1685
+ Notes
1686
+ -----
1687
+ This method is called automatically during application bootstrapping.
1688
+ After successful loading, the configurators storage is cleaned up to
1689
+ prevent memory leaks. The resulting configuration is stored in the
1690
+ __config attribute for later retrieval via config() method.
1198
1691
  """
1199
1692
 
1200
1693
  # Try to load the configuration
@@ -1232,22 +1725,43 @@ class Application(Container, IApplication):
1232
1725
  default: Any = None
1233
1726
  ) -> Any:
1234
1727
  """
1235
- Retrieves a configuration value from the application settings using dot notation.
1236
- This method allows you to access nested configuration values by specifying a key in dot notation
1237
- (e.g., "database.host"). If no key is provided, the entire configuration dictionary is returned.
1728
+ Retrieve application configuration values using dot notation.
1729
+
1730
+ This method provides access to the application's configuration settings
1731
+ with support for nested value retrieval using dot notation. It can return
1732
+ either a specific configuration value or the entire configuration dictionary.
1733
+
1734
+ Parameters
1735
+ ----------
1238
1736
  key : str, optional
1239
- The configuration key to retrieve, using dot notation for nested values (e.g., "app.name").
1240
- If None, returns the entire configuration dictionary. Default is None.
1241
- The value to return if the specified key does not exist in the configuration. Default is None.
1242
- The configuration value associated with the given key, the entire configuration dictionary if
1243
- key is None, or the default value if the key is not found.
1737
+ The configuration key to retrieve, supporting dot notation for nested
1738
+ values (e.g., "database.default", "app.name"). If None, returns the
1739
+ entire configuration dictionary excluding path configuration. Default is None.
1740
+ default : Any, optional
1741
+ The value to return if the specified key is not found in the configuration.
1742
+ Default is None.
1743
+
1744
+ Returns
1745
+ -------
1746
+ Any
1747
+ The configuration value associated with the given key, the entire
1748
+ configuration dictionary (excluding paths) if key is None, or the
1749
+ default value if the key is not found.
1244
1750
 
1245
1751
  Raises
1246
1752
  ------
1247
1753
  OrionisRuntimeError
1248
- If the application has not been booted and configuration is not available.
1754
+ If the application configuration has not been initialized. This occurs
1755
+ when config() is called before create().
1249
1756
  OrionisValueError
1250
- If the provided key is not a string.
1757
+ If the provided key parameter is not a string type.
1758
+
1759
+ Notes
1760
+ -----
1761
+ The method traverses nested configuration structures by splitting the key
1762
+ on dots and navigating through dictionary levels. Path configurations are
1763
+ excluded from full configuration returns and should be accessed via the
1764
+ path() method instead.
1251
1765
  """
1252
1766
 
1253
1767
  # Ensure the application is booted before accessing configuration
@@ -1294,29 +1808,43 @@ class Application(Container, IApplication):
1294
1808
  default: Any = None
1295
1809
  ) -> Any:
1296
1810
  """
1297
- Retrieve a path configuration value from the application's configuration.
1811
+ Retrieve application path configuration values using dot notation.
1812
+
1813
+ This method provides access to the application's path configuration settings
1814
+ with support for nested value retrieval using dot notation. It can return
1815
+ either a specific path value or the entire paths configuration dictionary.
1816
+
1298
1817
  Parameters
1299
1818
  ----------
1300
1819
  key : str, optional
1301
- Dot-notated key specifying the path configuration to retrieve.
1302
- If None, returns the entire 'paths' configuration dictionary.
1820
+ Dot-notated key specifying the path configuration to retrieve (e.g.,
1821
+ "console_commands", "storage.logs"). If None, returns the entire
1822
+ paths configuration dictionary. Default is None.
1303
1823
  default : Any, optional
1304
- Value to return if the specified key is not found. Defaults to None.
1824
+ Value to return if the specified key is not found in the path
1825
+ configuration. Default is None.
1826
+
1305
1827
  Returns
1306
1828
  -------
1307
1829
  Any
1308
- The configuration value corresponding to the given key, the entire 'paths'
1309
- dictionary if key is None, or the default value if the key is not found.
1830
+ The path configuration value corresponding to the given key, the entire
1831
+ paths dictionary if key is None, or the default value if the key is
1832
+ not found.
1833
+
1310
1834
  Raises
1311
1835
  ------
1312
1836
  OrionisRuntimeError
1313
- If the application configuration is not initialized (not booted).
1837
+ If the application configuration has not been initialized. This occurs
1838
+ when path() is called before create().
1314
1839
  OrionisValueError
1315
- If the provided key is not a string.
1840
+ If the provided key parameter is not a string type.
1841
+
1316
1842
  Notes
1317
1843
  -----
1318
- - The method traverses the 'paths' configuration using dot notation for nested keys.
1319
- - If any part of the key is not found, the default value is returned.
1844
+ The method traverses the paths configuration structure by splitting the key
1845
+ on dots and navigating through dictionary levels. This method is specifically
1846
+ designed for path-related configuration access, separate from general
1847
+ application configuration.
1320
1848
  """
1321
1849
 
1322
1850
  # Ensure the application is booted before accessing configuration
@@ -1360,12 +1888,31 @@ class Application(Container, IApplication):
1360
1888
  self
1361
1889
  ) -> 'Application':
1362
1890
  """
1363
- Bootstrap the application by loading providers and kernels.
1891
+ Bootstrap and initialize the complete application framework.
1892
+
1893
+ This method orchestrates the entire application startup process including
1894
+ configuration loading, service provider registration and booting, framework
1895
+ kernel initialization, and logging setup. It ensures the application is
1896
+ fully prepared for operation and prevents duplicate initialization.
1364
1897
 
1365
1898
  Returns
1366
1899
  -------
1367
1900
  Application
1368
- The application instance for method chaining
1901
+ The current application instance to enable method chaining.
1902
+
1903
+ Notes
1904
+ -----
1905
+ The bootstrap process follows this sequence:
1906
+ 1. Load and process all configuration from configurators
1907
+ 2. Register core framework service providers
1908
+ 3. Register and boot all service providers
1909
+ 4. Initialize framework kernels (Testing, CLI)
1910
+ 5. Log successful startup with timing information
1911
+ 6. Mark application as booted to prevent re-initialization
1912
+
1913
+ This method is idempotent - calling it multiple times will not cause
1914
+ duplicate initialization. The startup time is calculated and logged
1915
+ for performance monitoring purposes.
1369
1916
  """
1370
1917
  # Check if already booted
1371
1918
  if not self.__booted: