orionis 0.404.0__py3-none-any.whl → 0.406.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.
- orionis/console/base/command.py +57 -50
- orionis/console/base/contracts/command.py +68 -0
- orionis/console/dynamic/contracts/progress_bar.py +3 -3
- orionis/console/dynamic/progress_bar.py +8 -8
- orionis/console/output/console.py +8 -2
- orionis/console/output/contracts/console.py +1 -1
- orionis/container/container.py +2 -2
- orionis/container/context/scope.py +4 -1
- orionis/container/contracts/service_provider.py +2 -2
- orionis/container/entities/binding.py +31 -44
- orionis/container/enums/lifetimes.py +22 -1
- orionis/container/facades/facade.py +1 -2
- orionis/container/providers/service_provider.py +2 -2
- orionis/foundation/application.py +542 -248
- orionis/foundation/config/app/entities/app.py +107 -90
- orionis/foundation/config/auth/entities/auth.py +4 -33
- orionis/foundation/config/cache/entities/cache.py +18 -41
- orionis/foundation/config/cache/entities/file.py +8 -35
- orionis/foundation/config/cache/entities/stores.py +17 -38
- orionis/foundation/config/cors/entities/cors.py +41 -54
- orionis/foundation/config/database/entities/connections.py +40 -56
- orionis/foundation/config/database/entities/database.py +11 -38
- orionis/foundation/config/database/entities/mysql.py +48 -76
- orionis/foundation/config/database/entities/oracle.py +30 -57
- orionis/foundation/config/database/entities/pgsql.py +45 -61
- orionis/foundation/config/database/entities/sqlite.py +26 -53
- orionis/foundation/config/filesystems/entitites/aws.py +28 -49
- orionis/foundation/config/filesystems/entitites/disks.py +27 -47
- orionis/foundation/config/filesystems/entitites/filesystems.py +15 -37
- orionis/foundation/config/filesystems/entitites/local.py +9 -35
- orionis/foundation/config/filesystems/entitites/public.py +14 -41
- orionis/foundation/config/logging/entities/channels.py +56 -86
- orionis/foundation/config/logging/entities/chunked.py +18 -10
- orionis/foundation/config/logging/entities/daily.py +17 -9
- orionis/foundation/config/logging/entities/hourly.py +15 -7
- orionis/foundation/config/logging/entities/logging.py +12 -18
- orionis/foundation/config/logging/entities/monthly.py +16 -8
- orionis/foundation/config/logging/entities/stack.py +15 -7
- orionis/foundation/config/logging/entities/weekly.py +15 -7
- orionis/foundation/config/logging/validators/path.py +6 -0
- orionis/foundation/config/mail/entities/file.py +9 -36
- orionis/foundation/config/mail/entities/mail.py +22 -40
- orionis/foundation/config/mail/entities/mailers.py +29 -44
- orionis/foundation/config/mail/entities/smtp.py +47 -48
- orionis/foundation/config/queue/entities/brokers.py +19 -41
- orionis/foundation/config/queue/entities/database.py +24 -46
- orionis/foundation/config/queue/entities/queue.py +28 -40
- orionis/foundation/config/roots/paths.py +272 -468
- orionis/foundation/config/session/entities/session.py +23 -53
- orionis/foundation/config/startup.py +165 -135
- orionis/foundation/config/testing/entities/testing.py +137 -122
- orionis/foundation/config/testing/enums/__init__.py +6 -2
- orionis/foundation/config/testing/enums/drivers.py +16 -0
- orionis/foundation/config/testing/enums/verbosity.py +18 -0
- orionis/foundation/contracts/application.py +152 -362
- orionis/foundation/providers/console_provider.py +24 -2
- orionis/foundation/providers/dumper_provider.py +24 -2
- orionis/foundation/providers/logger_provider.py +24 -2
- orionis/foundation/providers/path_resolver_provider.py +25 -2
- orionis/foundation/providers/progress_bar_provider.py +24 -2
- orionis/foundation/providers/testing_provider.py +39 -0
- orionis/foundation/providers/workers_provider.py +24 -2
- orionis/metadata/framework.py +1 -1
- orionis/services/environment/helpers/functions.py +1 -2
- orionis/services/environment/key/__init__.py +0 -0
- orionis/services/environment/key/key_generator.py +37 -0
- orionis/services/log/handlers/filename.py +64 -0
- orionis/services/log/handlers/size_rotating.py +9 -40
- orionis/services/log/handlers/timed_rotating.py +9 -41
- orionis/services/log/log_service.py +9 -52
- orionis/support/entities/__init__.py +0 -0
- orionis/support/entities/base.py +104 -0
- orionis/support/facades/testing.py +15 -0
- orionis/support/facades/workers.py +1 -1
- orionis/test/cases/asynchronous.py +0 -11
- orionis/test/cases/synchronous.py +0 -9
- orionis/test/contracts/dumper.py +11 -4
- orionis/test/contracts/kernel.py +5 -110
- orionis/test/contracts/logs.py +27 -65
- orionis/test/contracts/printer.py +16 -128
- orionis/test/contracts/test_result.py +100 -0
- orionis/test/contracts/unit_test.py +87 -150
- orionis/test/core/unit_test.py +608 -554
- orionis/test/entities/result.py +22 -2
- orionis/test/enums/__init__.py +0 -2
- orionis/test/enums/status.py +14 -9
- orionis/test/exceptions/config.py +9 -1
- orionis/test/exceptions/failure.py +34 -11
- orionis/test/exceptions/persistence.py +10 -2
- orionis/test/exceptions/runtime.py +9 -1
- orionis/test/exceptions/value.py +13 -1
- orionis/test/kernel.py +87 -289
- orionis/test/output/dumper.py +82 -18
- orionis/test/output/printer.py +399 -156
- orionis/test/records/logs.py +203 -82
- orionis/test/validators/__init__.py +33 -0
- orionis/test/validators/base_path.py +45 -0
- orionis/test/validators/execution_mode.py +45 -0
- orionis/test/validators/fail_fast.py +37 -0
- orionis/test/validators/folder_path.py +34 -0
- orionis/test/validators/module_name.py +31 -0
- orionis/test/validators/name_pattern.py +40 -0
- orionis/test/validators/pattern.py +36 -0
- orionis/test/validators/persistent.py +42 -0
- orionis/test/validators/persistent_driver.py +43 -0
- orionis/test/validators/print_result.py +37 -0
- orionis/test/validators/tags.py +37 -0
- orionis/test/validators/throw_exception.py +39 -0
- orionis/test/validators/verbosity.py +37 -0
- orionis/test/validators/web_report.py +35 -0
- orionis/test/validators/workers.py +31 -0
- orionis/test/view/render.py +48 -54
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/METADATA +1 -1
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/RECORD +160 -108
- tests/container/__init__.py +0 -0
- tests/container/context/__init__.py +0 -0
- tests/container/context/test_manager.py +27 -0
- tests/container/context/test_scope.py +23 -0
- tests/container/entities/__init__.py +0 -0
- tests/container/entities/test_binding.py +133 -0
- tests/container/enums/__init__.py +0 -0
- tests/container/enums/test_lifetimes.py +63 -0
- tests/container/facades/__init__.py +0 -0
- tests/container/facades/test_facade.py +61 -0
- tests/container/mocks/__init__.py +0 -0
- tests/container/mocks/mock_complex_classes.py +482 -0
- tests/container/mocks/mock_simple_classes.py +32 -0
- tests/container/providers/__init__.py +0 -0
- tests/container/providers/test_providers.py +48 -0
- tests/container/resolver/__init__.py +0 -0
- tests/container/resolver/test_resolver.py +55 -0
- tests/container/test_container.py +254 -0
- tests/container/test_singleton.py +98 -0
- tests/container/test_thread_safety.py +217 -0
- tests/container/validators/__init__.py +0 -0
- tests/container/validators/test_implements.py +140 -0
- tests/container/validators/test_is_abstract_class.py +99 -0
- tests/container/validators/test_is_callable.py +73 -0
- tests/container/validators/test_is_concrete_class.py +97 -0
- tests/container/validators/test_is_instance.py +105 -0
- tests/container/validators/test_is_not_subclass.py +117 -0
- tests/container/validators/test_is_subclass.py +115 -0
- tests/container/validators/test_is_valid_alias.py +113 -0
- tests/container/validators/test_lifetime.py +75 -0
- tests/foundation/config/logging/test_foundation_config_logging_chunked.py +12 -34
- tests/foundation/config/logging/test_foundation_config_logging_daily.py +11 -11
- tests/foundation/config/logging/test_foundation_config_logging_hourly.py +7 -8
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +7 -10
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +6 -11
- tests/foundation/config/logging/test_foundation_config_logging_weekly.py +6 -5
- tests/foundation/config/testing/test_foundation_config_testing.py +1 -1
- tests/metadata/test_metadata_framework.py +18 -18
- tests/testing/test_testing_result.py +117 -117
- tests/testing/test_testing_unit.py +209 -209
- orionis/foundation/config/base.py +0 -112
- orionis/test/arguments/parser.py +0 -187
- orionis/test/contracts/parser.py +0 -43
- orionis/test/entities/arguments.py +0 -38
- orionis/test/enums/execution_mode.py +0 -16
- /orionis/{test/arguments → console/base/contracts}/__init__.py +0 -0
- /orionis/foundation/config/testing/enums/{test_mode.py → mode.py} +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/WHEEL +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/top_level.txt +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/zip-safe +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from abc import abstractmethod
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
from typing import Any, List, Type
|
|
4
|
+
from orionis.foundation.config.roots.paths import Paths
|
|
4
5
|
from orionis.container.contracts.service_provider import IServiceProvider
|
|
5
6
|
from orionis.container.contracts.container import IContainer
|
|
6
7
|
from orionis.foundation.config.app.entities.app import App
|
|
@@ -14,555 +15,344 @@ from orionis.foundation.config.mail.entities.mail import Mail
|
|
|
14
15
|
from orionis.foundation.config.queue.entities.queue import Queue
|
|
15
16
|
from orionis.foundation.config.session.entities.session import Session
|
|
16
17
|
from orionis.foundation.config.testing.entities.testing import Testing
|
|
17
|
-
from orionis.foundation.contracts.config import IConfig
|
|
18
18
|
|
|
19
19
|
class IApplication(IContainer):
|
|
20
|
-
"""
|
|
21
|
-
Abstract interface for application containers that manage service providers.
|
|
22
|
-
|
|
23
|
-
This interface extends IContainer to provide application-level functionality
|
|
24
|
-
including service provider management and application lifecycle operations.
|
|
25
|
-
|
|
26
|
-
By inheriting from IContainer, this interface provides access to all container
|
|
27
|
-
methods while adding application-specific functionality.
|
|
28
|
-
"""
|
|
29
20
|
|
|
30
21
|
@property
|
|
31
22
|
@abstractmethod
|
|
32
23
|
def isBooted(self) -> bool:
|
|
33
24
|
"""
|
|
34
|
-
|
|
25
|
+
Indicates whether the application has been booted.
|
|
35
26
|
|
|
36
27
|
Returns
|
|
37
28
|
-------
|
|
38
29
|
bool
|
|
39
|
-
True if
|
|
30
|
+
True if the application is booted, False otherwise.
|
|
40
31
|
"""
|
|
41
32
|
pass
|
|
42
33
|
|
|
34
|
+
@property
|
|
43
35
|
@abstractmethod
|
|
44
|
-
def
|
|
36
|
+
def startAt(self) -> int:
|
|
45
37
|
"""
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Parameters
|
|
49
|
-
----------
|
|
50
|
-
providers : List[Type[IServiceProvider]], optional
|
|
51
|
-
List of provider classes to add to the application
|
|
38
|
+
Returns the timestamp when the application was started.
|
|
52
39
|
|
|
53
40
|
Returns
|
|
54
41
|
-------
|
|
55
|
-
|
|
56
|
-
The
|
|
42
|
+
int
|
|
43
|
+
The start time as a Unix timestamp.
|
|
57
44
|
"""
|
|
58
45
|
pass
|
|
59
46
|
|
|
60
47
|
@abstractmethod
|
|
61
|
-
def
|
|
62
|
-
self,
|
|
63
|
-
*,
|
|
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
|
|
75
|
-
) -> 'IApplication':
|
|
48
|
+
def withProviders(self, providers: List[Type[IServiceProvider]] = []) -> 'IApplication':
|
|
76
49
|
"""
|
|
77
|
-
|
|
50
|
+
Add multiple service providers to the application.
|
|
78
51
|
|
|
79
52
|
Parameters
|
|
80
53
|
----------
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
auth : Auth, optional
|
|
84
|
-
Authentication configuration
|
|
85
|
-
cache : Cache, optional
|
|
86
|
-
Cache configuration
|
|
87
|
-
cors : Cors, optional
|
|
88
|
-
CORS configuration
|
|
89
|
-
database : Database, optional
|
|
90
|
-
Database configuration
|
|
91
|
-
filesystems : Filesystems, optional
|
|
92
|
-
Filesystems configuration
|
|
93
|
-
logging : Logging, optional
|
|
94
|
-
Logging configuration
|
|
95
|
-
mail : Mail, optional
|
|
96
|
-
Mail configuration
|
|
97
|
-
queue : Queue, optional
|
|
98
|
-
Queue configuration
|
|
99
|
-
session : Session, optional
|
|
100
|
-
Session configuration
|
|
101
|
-
testing : Testing, optional
|
|
102
|
-
Testing configuration
|
|
54
|
+
providers : List[Type[IServiceProvider]], optional
|
|
55
|
+
List of provider classes to add to the application.
|
|
103
56
|
|
|
104
57
|
Returns
|
|
105
58
|
-------
|
|
106
59
|
IApplication
|
|
107
|
-
The application instance for method chaining
|
|
60
|
+
The application instance for method chaining.
|
|
108
61
|
"""
|
|
109
62
|
pass
|
|
110
63
|
|
|
111
64
|
@abstractmethod
|
|
112
|
-
def
|
|
113
|
-
"""
|
|
65
|
+
def addProvider(self, provider: Type[IServiceProvider]) -> 'IApplication':
|
|
66
|
+
"""
|
|
67
|
+
Add a single service provider to the application.
|
|
114
68
|
|
|
115
69
|
Parameters
|
|
116
70
|
----------
|
|
117
|
-
|
|
118
|
-
The
|
|
71
|
+
provider : Type[IServiceProvider]
|
|
72
|
+
The provider class to add to the application.
|
|
119
73
|
|
|
120
74
|
Returns
|
|
121
75
|
-------
|
|
122
76
|
IApplication
|
|
123
|
-
The application instance for method chaining
|
|
77
|
+
The application instance for method chaining.
|
|
124
78
|
"""
|
|
125
79
|
pass
|
|
126
80
|
|
|
127
81
|
@abstractmethod
|
|
128
|
-
def
|
|
82
|
+
def withConfigurators(
|
|
83
|
+
self,
|
|
84
|
+
*,
|
|
85
|
+
app: App | dict = App(),
|
|
86
|
+
auth: Auth | dict = Auth(),
|
|
87
|
+
cache : Cache | dict = Cache(),
|
|
88
|
+
cors : Cors | dict = Cors(),
|
|
89
|
+
database : Database | dict = Database(),
|
|
90
|
+
filesystems : Filesystems | dict = Filesystems(),
|
|
91
|
+
logging : Logging | dict = Logging(),
|
|
92
|
+
mail : Mail | dict = Mail(),
|
|
93
|
+
path : Paths | dict = Paths(),
|
|
94
|
+
queue : Queue | dict = Queue(),
|
|
95
|
+
session : Session | dict = Session(),
|
|
96
|
+
testing : Testing | dict = Testing()
|
|
97
|
+
) -> 'IApplication':
|
|
129
98
|
"""
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Parameters
|
|
133
|
-
----------
|
|
134
|
-
auth : Auth
|
|
135
|
-
The Auth instance containing authentication configuration
|
|
99
|
+
Configure the application with various service configurators.
|
|
100
|
+
Allows setting up different aspects of the application by providing configurator instances for services like authentication, caching, database, etc.
|
|
136
101
|
|
|
137
102
|
Returns
|
|
138
103
|
-------
|
|
139
104
|
IApplication
|
|
140
|
-
|
|
105
|
+
Returns self to allow method chaining.
|
|
141
106
|
"""
|
|
142
107
|
pass
|
|
143
108
|
|
|
144
109
|
@abstractmethod
|
|
145
|
-
def
|
|
110
|
+
def setConfigApp(self, **app_config) -> 'IApplication':
|
|
146
111
|
"""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
Parameters
|
|
150
|
-
----------
|
|
151
|
-
cache : Cache
|
|
152
|
-
The Cache instance containing cache configuration
|
|
153
|
-
|
|
154
|
-
Returns
|
|
155
|
-
-------
|
|
156
|
-
IApplication
|
|
157
|
-
The application instance for method chaining
|
|
112
|
+
Set the application configuration using keyword arguments.
|
|
158
113
|
"""
|
|
159
114
|
pass
|
|
160
115
|
|
|
161
116
|
@abstractmethod
|
|
162
|
-
def
|
|
117
|
+
def loadConfigApp(self, app: App | dict) -> 'IApplication':
|
|
163
118
|
"""
|
|
164
|
-
Load the
|
|
165
|
-
|
|
166
|
-
Parameters
|
|
167
|
-
----------
|
|
168
|
-
cors : Cors
|
|
169
|
-
The Cors instance containing CORS configuration
|
|
170
|
-
|
|
171
|
-
Returns
|
|
172
|
-
-------
|
|
173
|
-
IApplication
|
|
174
|
-
The application instance for method chaining
|
|
119
|
+
Load the application configuration from an App instance or dictionary.
|
|
175
120
|
"""
|
|
176
121
|
pass
|
|
177
122
|
|
|
178
123
|
@abstractmethod
|
|
179
|
-
def
|
|
124
|
+
def setConfigAuth(self, **auth_config) -> 'IApplication':
|
|
180
125
|
"""
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Parameters
|
|
184
|
-
----------
|
|
185
|
-
database : Database
|
|
186
|
-
The Database instance containing database configuration
|
|
187
|
-
|
|
188
|
-
Returns
|
|
189
|
-
-------
|
|
190
|
-
IApplication
|
|
191
|
-
The application instance for method chaining
|
|
126
|
+
Set the authentication configuration using keyword arguments.
|
|
192
127
|
"""
|
|
193
128
|
pass
|
|
194
129
|
|
|
195
130
|
@abstractmethod
|
|
196
|
-
def
|
|
131
|
+
def loadConfigAuth(self, auth: Auth | dict) -> 'IApplication':
|
|
197
132
|
"""
|
|
198
|
-
Load the
|
|
199
|
-
|
|
200
|
-
Parameters
|
|
201
|
-
----------
|
|
202
|
-
filesystems : Filesystems
|
|
203
|
-
The Filesystems instance containing filesystems configuration
|
|
204
|
-
|
|
205
|
-
Returns
|
|
206
|
-
-------
|
|
207
|
-
IApplication
|
|
208
|
-
The application instance for method chaining
|
|
133
|
+
Load the authentication configuration from an Auth instance or dictionary.
|
|
209
134
|
"""
|
|
210
135
|
pass
|
|
211
136
|
|
|
212
137
|
@abstractmethod
|
|
213
|
-
def
|
|
138
|
+
def setConfigCache(self, **cache_config) -> 'IApplication':
|
|
214
139
|
"""
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
Parameters
|
|
218
|
-
----------
|
|
219
|
-
logging : Logging
|
|
220
|
-
The Logging instance containing logging configuration
|
|
221
|
-
|
|
222
|
-
Returns
|
|
223
|
-
-------
|
|
224
|
-
IApplication
|
|
225
|
-
The application instance for method chaining
|
|
140
|
+
Set the cache configuration using keyword arguments.
|
|
226
141
|
"""
|
|
227
142
|
pass
|
|
228
143
|
|
|
229
144
|
@abstractmethod
|
|
230
|
-
def
|
|
145
|
+
def loadConfigCache(self, cache: Cache | dict) -> 'IApplication':
|
|
231
146
|
"""
|
|
232
|
-
Load the
|
|
233
|
-
|
|
234
|
-
Parameters
|
|
235
|
-
----------
|
|
236
|
-
mail : Mail
|
|
237
|
-
The Mail instance containing mail configuration
|
|
238
|
-
|
|
239
|
-
Returns
|
|
240
|
-
-------
|
|
241
|
-
IApplication
|
|
242
|
-
The application instance for method chaining
|
|
147
|
+
Load the cache configuration from a Cache instance or dictionary.
|
|
243
148
|
"""
|
|
244
149
|
pass
|
|
245
150
|
|
|
246
151
|
@abstractmethod
|
|
247
|
-
def
|
|
152
|
+
def setConfigCors(self, **cors_config) -> 'IApplication':
|
|
248
153
|
"""
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
Parameters
|
|
252
|
-
----------
|
|
253
|
-
queue : Queue
|
|
254
|
-
The Queue instance containing queue configuration
|
|
255
|
-
|
|
256
|
-
Returns
|
|
257
|
-
-------
|
|
258
|
-
IApplication
|
|
259
|
-
The application instance for method chaining
|
|
154
|
+
Set the CORS configuration using keyword arguments.
|
|
260
155
|
"""
|
|
261
156
|
pass
|
|
262
157
|
|
|
263
158
|
@abstractmethod
|
|
264
|
-
def
|
|
159
|
+
def loadConfigCors(self, cors: Cors | dict) -> 'IApplication':
|
|
265
160
|
"""
|
|
266
|
-
Load the
|
|
267
|
-
|
|
268
|
-
Parameters
|
|
269
|
-
----------
|
|
270
|
-
session : Session
|
|
271
|
-
The Session instance containing session configuration
|
|
272
|
-
|
|
273
|
-
Returns
|
|
274
|
-
-------
|
|
275
|
-
IApplication
|
|
276
|
-
The application instance for method chaining
|
|
161
|
+
Load the CORS configuration from a Cors instance or dictionary.
|
|
277
162
|
"""
|
|
278
163
|
pass
|
|
279
164
|
|
|
280
165
|
@abstractmethod
|
|
281
|
-
def
|
|
166
|
+
def setConfigDatabase(self, **database_config) -> 'IApplication':
|
|
282
167
|
"""
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
Parameters
|
|
286
|
-
----------
|
|
287
|
-
testing : Testing
|
|
288
|
-
The Testing instance containing testing configuration
|
|
289
|
-
|
|
290
|
-
Returns
|
|
291
|
-
-------
|
|
292
|
-
IApplication
|
|
293
|
-
The application instance for method chaining
|
|
168
|
+
Set the database configuration using keyword arguments.
|
|
294
169
|
"""
|
|
295
170
|
pass
|
|
296
171
|
|
|
297
172
|
@abstractmethod
|
|
298
|
-
def
|
|
173
|
+
def loadConfigDatabase(self, database: Database | dict) -> 'IApplication':
|
|
299
174
|
"""
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
Parameters
|
|
303
|
-
----------
|
|
304
|
-
provider : Type[IServiceProvider]
|
|
305
|
-
The provider class to add to the application
|
|
306
|
-
|
|
307
|
-
Returns
|
|
308
|
-
-------
|
|
309
|
-
IApplication
|
|
310
|
-
The application instance for method chaining
|
|
175
|
+
Load the database configuration from a Database instance or dictionary.
|
|
311
176
|
"""
|
|
312
177
|
pass
|
|
313
178
|
|
|
314
179
|
@abstractmethod
|
|
315
|
-
def
|
|
180
|
+
def setConfigFilesystems(self, **filesystems_config) -> 'IApplication':
|
|
316
181
|
"""
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
Returns
|
|
320
|
-
-------
|
|
321
|
-
IApplication
|
|
322
|
-
The application instance for method chaining
|
|
182
|
+
Set the filesystems configuration using keyword arguments.
|
|
323
183
|
"""
|
|
324
184
|
pass
|
|
325
185
|
|
|
326
186
|
@abstractmethod
|
|
327
|
-
def
|
|
328
|
-
self,
|
|
329
|
-
key: str,
|
|
330
|
-
default: Any = None
|
|
331
|
-
) -> Any:
|
|
187
|
+
def loadConfigFilesystems(self, filesystems: Filesystems | dict) -> 'IApplication':
|
|
332
188
|
"""
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
Parameters
|
|
336
|
-
----------
|
|
337
|
-
key : str
|
|
338
|
-
The configuration key to retrieve using dot notation (e.g. "app.name") (default is None)
|
|
339
|
-
default : Any, optional
|
|
340
|
-
Default value to return if key is not found
|
|
341
|
-
|
|
342
|
-
Returns
|
|
343
|
-
-------
|
|
344
|
-
Any
|
|
345
|
-
The configuration value or the entire configuration if key is None
|
|
189
|
+
Load the filesystems configuration from a Filesystems instance or dictionary.
|
|
346
190
|
"""
|
|
347
191
|
pass
|
|
348
192
|
|
|
349
193
|
@abstractmethod
|
|
350
|
-
def
|
|
194
|
+
def setConfigLogging(self, **logging_config) -> 'IApplication':
|
|
351
195
|
"""
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
Parameters
|
|
355
|
-
----------
|
|
356
|
-
**app_config : dict
|
|
357
|
-
Configuration parameters for the application. Must match the fields
|
|
358
|
-
expected by the App dataclass (orionis.foundation.config.app.entities.app.App).
|
|
359
|
-
|
|
360
|
-
Returns
|
|
361
|
-
-------
|
|
362
|
-
IApplication
|
|
363
|
-
The application instance for method chaining
|
|
196
|
+
Set the logging configuration using keyword arguments.
|
|
364
197
|
"""
|
|
365
198
|
pass
|
|
366
199
|
|
|
367
200
|
@abstractmethod
|
|
368
|
-
def
|
|
201
|
+
def loadConfigLogging(self, logging: Logging | dict) -> 'IApplication':
|
|
369
202
|
"""
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
Parameters
|
|
373
|
-
----------
|
|
374
|
-
**auth_config : dict
|
|
375
|
-
Configuration parameters for authentication. Must match the fields
|
|
376
|
-
expected by the Auth dataclass (orionis.foundation.config.auth.entities.auth.Auth).
|
|
377
|
-
|
|
378
|
-
Returns
|
|
379
|
-
-------
|
|
380
|
-
IApplication
|
|
381
|
-
The application instance for method chaining
|
|
203
|
+
Load the logging configuration from a Logging instance or dictionary.
|
|
382
204
|
"""
|
|
383
205
|
pass
|
|
384
206
|
|
|
385
207
|
@abstractmethod
|
|
386
|
-
def
|
|
208
|
+
def setConfigMail(self, **mail_config) -> 'IApplication':
|
|
387
209
|
"""
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
Parameters
|
|
391
|
-
----------
|
|
392
|
-
**cache_config : dict
|
|
393
|
-
Configuration parameters for cache. Must match the fields
|
|
394
|
-
expected by the Cache dataclass (orionis.foundation.config.cache.entities.cache.Cache).
|
|
395
|
-
|
|
396
|
-
Returns
|
|
397
|
-
-------
|
|
398
|
-
IApplication
|
|
399
|
-
The application instance for method chaining
|
|
210
|
+
Set the mail configuration using keyword arguments.
|
|
400
211
|
"""
|
|
401
212
|
pass
|
|
402
213
|
|
|
403
214
|
@abstractmethod
|
|
404
|
-
def
|
|
215
|
+
def loadConfigMail(self, mail: Mail | dict) -> 'IApplication':
|
|
405
216
|
"""
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
Parameters
|
|
409
|
-
----------
|
|
410
|
-
**cors_config : dict
|
|
411
|
-
Configuration parameters for CORS. Must match the fields
|
|
412
|
-
expected by the Cors dataclass (orionis.foundation.config.cors.entities.cors.Cors).
|
|
413
|
-
|
|
414
|
-
Returns
|
|
415
|
-
-------
|
|
416
|
-
IApplication
|
|
417
|
-
The application instance for method chaining
|
|
217
|
+
Load the mail configuration from a Mail instance or dictionary.
|
|
418
218
|
"""
|
|
419
219
|
pass
|
|
420
220
|
|
|
421
221
|
@abstractmethod
|
|
422
|
-
def
|
|
222
|
+
def setPaths(
|
|
223
|
+
self,
|
|
224
|
+
*,
|
|
225
|
+
console_scheduler: str | Path = (Path.cwd() / 'app' / 'console' / 'kernel.py').resolve(),
|
|
226
|
+
console_commands: str | Path = (Path.cwd() / 'app' / 'console' / 'commands').resolve(),
|
|
227
|
+
http_controllers: str | Path = (Path.cwd() / 'app' / 'http' / 'controllers').resolve(),
|
|
228
|
+
http_middleware: str | Path = (Path.cwd() / 'app' / 'http' / 'middleware').resolve(),
|
|
229
|
+
http_requests: str | Path = (Path.cwd() / 'app' / 'http' / 'requests').resolve(),
|
|
230
|
+
models: str | Path = (Path.cwd() / 'app' / 'models').resolve(),
|
|
231
|
+
providers: str | Path = (Path.cwd() / 'app' / 'providers').resolve(),
|
|
232
|
+
events: str | Path = (Path.cwd() / 'app' / 'events').resolve(),
|
|
233
|
+
listeners: str | Path = (Path.cwd() / 'app' / 'listeners').resolve(),
|
|
234
|
+
notifications: str | Path = (Path.cwd() / 'app' / 'notifications').resolve(),
|
|
235
|
+
jobs: str | Path = (Path.cwd() / 'app' / 'jobs').resolve(),
|
|
236
|
+
policies: str | Path = (Path.cwd() / 'app' / 'policies').resolve(),
|
|
237
|
+
exceptions: str | Path = (Path.cwd() / 'app' / 'exceptions').resolve(),
|
|
238
|
+
services: str | Path = (Path.cwd() / 'app' / 'services').resolve(),
|
|
239
|
+
views: str | Path = (Path.cwd() / 'resources' / 'views').resolve(),
|
|
240
|
+
lang: str | Path = (Path.cwd() / 'resources' / 'lang').resolve(),
|
|
241
|
+
assets: str | Path = (Path.cwd() / 'resources' / 'assets').resolve(),
|
|
242
|
+
routes_web: str | Path = (Path.cwd() / 'routes' / 'web.py').resolve(),
|
|
243
|
+
routes_api: str | Path = (Path.cwd() / 'routes' / 'api.py').resolve(),
|
|
244
|
+
routes_console: str | Path = (Path.cwd() / 'routes' / 'console.py').resolve(),
|
|
245
|
+
routes_channels: str | Path = (Path.cwd() / 'routes' / 'channels.py').resolve(),
|
|
246
|
+
config: str | Path = (Path.cwd() / 'config').resolve(),
|
|
247
|
+
migrations: str | Path = (Path.cwd() / 'database' / 'migrations').resolve(),
|
|
248
|
+
seeders: str | Path = (Path.cwd() / 'database' / 'seeders').resolve(),
|
|
249
|
+
factories: str | Path = (Path.cwd() / 'database' / 'factories').resolve(),
|
|
250
|
+
storage_logs: str | Path = (Path.cwd() / 'storage' / 'logs').resolve(),
|
|
251
|
+
storage_framework: str | Path = (Path.cwd() / 'storage' / 'framework').resolve(),
|
|
252
|
+
storage_sessions: str | Path = (Path.cwd() / 'storage' / 'framework' / 'sessions').resolve(),
|
|
253
|
+
storage_cache: str | Path = (Path.cwd() / 'storage' / 'framework' / 'cache').resolve(),
|
|
254
|
+
storage_views: str | Path = (Path.cwd() / 'storage' / 'framework' / 'views').resolve(),
|
|
255
|
+
) -> 'IApplication':
|
|
423
256
|
"""
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
Parameters
|
|
427
|
-
----------
|
|
428
|
-
**database_config : dict
|
|
429
|
-
Configuration parameters for database. Must match the fields
|
|
430
|
-
expected by the Database dataclass (orionis.foundation.config.database.entities.database.Database).
|
|
431
|
-
|
|
432
|
-
Returns
|
|
433
|
-
-------
|
|
434
|
-
IApplication
|
|
435
|
-
The application instance for method chaining
|
|
257
|
+
Set the application paths configuration using keyword arguments.
|
|
436
258
|
"""
|
|
437
259
|
pass
|
|
438
260
|
|
|
439
261
|
@abstractmethod
|
|
440
|
-
def
|
|
262
|
+
def loadPaths(self, paths: Paths | dict) -> 'IApplication':
|
|
441
263
|
"""
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
Parameters
|
|
445
|
-
----------
|
|
446
|
-
**filesystems_config : dict
|
|
447
|
-
Configuration parameters for filesystems. Must match the fields
|
|
448
|
-
expected by the Filesystems dataclass (orionis.foundation.config.filesystems.entitites.filesystems.Filesystems).
|
|
449
|
-
|
|
450
|
-
Returns
|
|
451
|
-
-------
|
|
452
|
-
IApplication
|
|
453
|
-
The application instance for method chaining
|
|
264
|
+
Load the application paths configuration from a Paths instance or dictionary.
|
|
454
265
|
"""
|
|
455
266
|
pass
|
|
456
267
|
|
|
457
268
|
@abstractmethod
|
|
458
|
-
def
|
|
269
|
+
def setConfigQueue(self, **queue_config) -> 'IApplication':
|
|
459
270
|
"""
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
Parameters
|
|
463
|
-
----------
|
|
464
|
-
**logging_config : dict
|
|
465
|
-
Configuration parameters for logging. Must match the fields
|
|
466
|
-
expected by the Logging dataclass (orionis.foundation.config.logging.entities.logging.Logging).
|
|
467
|
-
|
|
468
|
-
Returns
|
|
469
|
-
-------
|
|
470
|
-
IApplication
|
|
471
|
-
The application instance for method chaining
|
|
271
|
+
Set the queue configuration using keyword arguments.
|
|
472
272
|
"""
|
|
473
273
|
pass
|
|
474
274
|
|
|
475
275
|
@abstractmethod
|
|
476
|
-
def
|
|
276
|
+
def loadConfigQueue(self, queue: Queue | dict) -> 'IApplication':
|
|
477
277
|
"""
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
----------
|
|
482
|
-
**mail_config : dict
|
|
483
|
-
Configuration parameters for mail. Must match the fields
|
|
484
|
-
expected by the Mail dataclass (orionis.foundation.config.mail.entities.mail.Mail).
|
|
278
|
+
Load the queue configuration from a Queue instance or dictionary.
|
|
279
|
+
"""
|
|
280
|
+
pass
|
|
485
281
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
282
|
+
@abstractmethod
|
|
283
|
+
def setConfigSession(self, **session_config) -> 'IApplication':
|
|
284
|
+
"""
|
|
285
|
+
Set the session configuration using keyword arguments.
|
|
490
286
|
"""
|
|
491
287
|
pass
|
|
492
288
|
|
|
493
289
|
@abstractmethod
|
|
494
|
-
def
|
|
290
|
+
def loadConfigSession(self, session: Session | dict) -> 'IApplication':
|
|
291
|
+
"""
|
|
292
|
+
Load the session configuration from a Session instance or dictionary.
|
|
495
293
|
"""
|
|
496
|
-
|
|
294
|
+
pass
|
|
497
295
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
296
|
+
@abstractmethod
|
|
297
|
+
def setConfigTesting(self, **testing_config) -> 'IApplication':
|
|
298
|
+
"""
|
|
299
|
+
Set the testing configuration using keyword arguments.
|
|
300
|
+
"""
|
|
301
|
+
pass
|
|
503
302
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
303
|
+
@abstractmethod
|
|
304
|
+
def loadConfigTesting(self, testing: Testing | dict) -> 'IApplication':
|
|
305
|
+
"""
|
|
306
|
+
Load the testing configuration from a Testing instance or dictionary.
|
|
508
307
|
"""
|
|
509
308
|
pass
|
|
510
309
|
|
|
511
310
|
@abstractmethod
|
|
512
|
-
def
|
|
311
|
+
def config(self, key: str = None, default: Any = None) -> Any:
|
|
513
312
|
"""
|
|
514
|
-
|
|
313
|
+
Retrieve a configuration value using dot notation, or the entire configuration if no key is provided.
|
|
515
314
|
|
|
516
315
|
Parameters
|
|
517
316
|
----------
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
317
|
+
key : str, optional
|
|
318
|
+
The configuration key to retrieve.
|
|
319
|
+
default : Any, optional
|
|
320
|
+
The default value to return if the key is not found.
|
|
521
321
|
|
|
522
322
|
Returns
|
|
523
323
|
-------
|
|
524
|
-
|
|
525
|
-
The
|
|
324
|
+
Any
|
|
325
|
+
The configuration value or the default.
|
|
526
326
|
"""
|
|
527
327
|
pass
|
|
528
328
|
|
|
529
329
|
@abstractmethod
|
|
530
|
-
def
|
|
330
|
+
def path(self, key: str = None, default: Any = None) -> Any:
|
|
531
331
|
"""
|
|
532
|
-
|
|
332
|
+
Retrieve a path configuration value using dot notation, or the entire paths configuration if no key is provided.
|
|
533
333
|
|
|
534
334
|
Parameters
|
|
535
335
|
----------
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
336
|
+
key : str, optional
|
|
337
|
+
The path key to retrieve.
|
|
338
|
+
default : Any, optional
|
|
339
|
+
The default value to return if the key is not found.
|
|
539
340
|
|
|
540
341
|
Returns
|
|
541
342
|
-------
|
|
542
|
-
|
|
543
|
-
The
|
|
343
|
+
Any
|
|
344
|
+
The path value or the default.
|
|
544
345
|
"""
|
|
545
346
|
pass
|
|
546
347
|
|
|
547
348
|
@abstractmethod
|
|
548
|
-
def
|
|
549
|
-
self,
|
|
550
|
-
key: str,
|
|
551
|
-
default: str = None
|
|
552
|
-
) -> Path:
|
|
349
|
+
def create(self) -> 'IApplication':
|
|
553
350
|
"""
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
Parameters
|
|
557
|
-
----------
|
|
558
|
-
key : str
|
|
559
|
-
The path key to retrieve using dot notation (e.g. "paths.storage")
|
|
560
|
-
default : str, optional
|
|
561
|
-
Default value to return if key is not found
|
|
351
|
+
Bootstrap the application, loading all necessary providers and kernels.
|
|
562
352
|
|
|
563
353
|
Returns
|
|
564
354
|
-------
|
|
565
|
-
|
|
566
|
-
The
|
|
355
|
+
IApplication
|
|
356
|
+
The initialized application instance.
|
|
567
357
|
"""
|
|
568
|
-
pass
|
|
358
|
+
pass
|