orionis 0.1.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/__init__.py +0 -0
- orionis/cli_manager.py +48 -0
- orionis/framework.py +45 -0
- orionis/luminate/__init__.py +0 -0
- orionis/luminate/app.py +0 -0
- orionis/luminate/bootstrap/__init__.py +0 -0
- orionis/luminate/bootstrap/parser.py +49 -0
- orionis/luminate/bootstrap/register.py +95 -0
- orionis/luminate/cache/__init__.py +0 -0
- orionis/luminate/cache/app/__init__.py +0 -0
- orionis/luminate/cache/app/config.py +96 -0
- orionis/luminate/cache/console/__init__.py +0 -0
- orionis/luminate/cache/console/commands.py +98 -0
- orionis/luminate/config/__init__.py +0 -0
- orionis/luminate/config/dataclass/__init__.py +0 -0
- orionis/luminate/config/dataclass/app.py +50 -0
- orionis/luminate/config/dataclass/auth.py +17 -0
- orionis/luminate/config/dataclass/cache.py +51 -0
- orionis/luminate/config/dataclass/cors.py +58 -0
- orionis/luminate/config/dataclass/database.py +203 -0
- orionis/luminate/config/dataclass/filesystems.py +102 -0
- orionis/luminate/config/dataclass/logging.py +107 -0
- orionis/luminate/config/dataclass/mail.py +81 -0
- orionis/luminate/config/dataclass/queue.py +63 -0
- orionis/luminate/config/dataclass/session.py +59 -0
- orionis/luminate/config/environment.py +110 -0
- orionis/luminate/config/sections.py +37 -0
- orionis/luminate/console/__init__.py +0 -0
- orionis/luminate/console/base/__init__.py +0 -0
- orionis/luminate/console/base/command.py +427 -0
- orionis/luminate/console/cache.py +132 -0
- orionis/luminate/console/command.py +40 -0
- orionis/luminate/console/command_filter.py +40 -0
- orionis/luminate/console/commands/__init__.py +0 -0
- orionis/luminate/console/commands/cache_clear.py +56 -0
- orionis/luminate/console/commands/help.py +59 -0
- orionis/luminate/console/commands/schedule_work.py +50 -0
- orionis/luminate/console/commands/tests.py +40 -0
- orionis/luminate/console/commands/version.py +39 -0
- orionis/luminate/console/exceptions/__init__.py +0 -0
- orionis/luminate/console/exceptions/cli_exception.py +125 -0
- orionis/luminate/console/kernel.py +32 -0
- orionis/luminate/console/output/__init__.py +0 -0
- orionis/luminate/console/output/console.py +426 -0
- orionis/luminate/console/output/executor.py +90 -0
- orionis/luminate/console/output/progress_bar.py +100 -0
- orionis/luminate/console/output/styles.py +95 -0
- orionis/luminate/console/parser.py +159 -0
- orionis/luminate/console/register.py +98 -0
- orionis/luminate/console/runner.py +126 -0
- orionis/luminate/console/scripts/__init__.py +0 -0
- orionis/luminate/console/scripts/management.py +94 -0
- orionis/luminate/console/tasks/__init__.py +0 -0
- orionis/luminate/console/tasks/scheduler.py +616 -0
- orionis/luminate/contracts/__init__.py +0 -0
- orionis/luminate/contracts/bootstrap/parser_interface.py +46 -0
- orionis/luminate/contracts/cache/__init__.py +0 -0
- orionis/luminate/contracts/cache/cache_commands_interface.py +69 -0
- orionis/luminate/contracts/config/__init__.py +0 -0
- orionis/luminate/contracts/config/config_interface.py +27 -0
- orionis/luminate/contracts/config/environment_interface.py +64 -0
- orionis/luminate/contracts/console/__init__.py +0 -0
- orionis/luminate/contracts/console/base_command_interface.py +448 -0
- orionis/luminate/contracts/console/cli_cache_interface.py +34 -0
- orionis/luminate/contracts/console/command_filter_interface.py +32 -0
- orionis/luminate/contracts/console/command_interface.py +36 -0
- orionis/luminate/contracts/console/console_interface.py +305 -0
- orionis/luminate/contracts/console/executor_interface.py +51 -0
- orionis/luminate/contracts/console/kernel_interface.py +32 -0
- orionis/luminate/contracts/console/management_interface.py +63 -0
- orionis/luminate/contracts/console/parser_interface.py +76 -0
- orionis/luminate/contracts/console/progress_bar_interface.py +66 -0
- orionis/luminate/contracts/console/register_interface.py +32 -0
- orionis/luminate/contracts/console/runner_interface.py +50 -0
- orionis/luminate/contracts/console/schedule_interface.py +317 -0
- orionis/luminate/contracts/console/task_manager_interface.py +37 -0
- orionis/luminate/contracts/facades/__init__.py +0 -0
- orionis/luminate/contracts/facades/env_interface.py +64 -0
- orionis/luminate/contracts/facades/log_interface.py +48 -0
- orionis/luminate/contracts/facades/paths_interface.py +141 -0
- orionis/luminate/contracts/facades/tests_interface.py +33 -0
- orionis/luminate/contracts/files/__init__.py +0 -0
- orionis/luminate/contracts/files/paths_interface.py +29 -0
- orionis/luminate/contracts/installer/__init__.py +0 -0
- orionis/luminate/contracts/installer/output_interface.py +125 -0
- orionis/luminate/contracts/installer/setup_interface.py +29 -0
- orionis/luminate/contracts/installer/upgrade_interface.py +24 -0
- orionis/luminate/contracts/log/__init__.py +0 -0
- orionis/luminate/contracts/log/logger_interface.py +33 -0
- orionis/luminate/contracts/pipelines/cli_pipeline_interface.py +84 -0
- orionis/luminate/contracts/publisher/__init__.py +0 -0
- orionis/luminate/contracts/publisher/pypi_publisher_interface.py +36 -0
- orionis/luminate/contracts/test/__init__.py +0 -0
- orionis/luminate/contracts/test/unit_test_interface.py +51 -0
- orionis/luminate/contracts/tools/__init__.py +0 -0
- orionis/luminate/contracts/tools/reflection_interface.py +343 -0
- orionis/luminate/contracts/tools/std_interface.py +56 -0
- orionis/luminate/facades/__init__.py +0 -0
- orionis/luminate/facades/environment.py +81 -0
- orionis/luminate/facades/log.py +56 -0
- orionis/luminate/facades/paths.py +268 -0
- orionis/luminate/facades/tests.py +48 -0
- orionis/luminate/files/__init__.py +0 -0
- orionis/luminate/files/paths.py +56 -0
- orionis/luminate/installer/__init__.py +0 -0
- orionis/luminate/installer/icon.ascii +11 -0
- orionis/luminate/installer/info.ascii +13 -0
- orionis/luminate/installer/output.py +188 -0
- orionis/luminate/installer/setup.py +191 -0
- orionis/luminate/installer/upgrade.py +42 -0
- orionis/luminate/log/__init__.py +0 -0
- orionis/luminate/log/logger.py +116 -0
- orionis/luminate/pipelines/__init__.py +0 -0
- orionis/luminate/pipelines/cli_pipeline.py +116 -0
- orionis/luminate/publisher/__init__.py +0 -0
- orionis/luminate/publisher/pypi.py +206 -0
- orionis/luminate/static/logos/flaskavel.png +0 -0
- orionis/luminate/test/__init__.py +0 -0
- orionis/luminate/test/exception.py +48 -0
- orionis/luminate/test/unit_test.py +108 -0
- orionis/luminate/tools/__init__.py +0 -0
- orionis/luminate/tools/reflection.py +390 -0
- orionis/luminate/tools/std.py +53 -0
- orionis-0.1.0.dist-info/LICENCE +21 -0
- orionis-0.1.0.dist-info/METADATA +27 -0
- orionis-0.1.0.dist-info/RECORD +133 -0
- orionis-0.1.0.dist-info/WHEEL +5 -0
- orionis-0.1.0.dist-info/entry_points.txt +2 -0
- orionis-0.1.0.dist-info/top_level.txt +2 -0
- tests/__init__.py +0 -0
- tests/tools/__init__.py +0 -0
- tests/tools/class_example.py +50 -0
- tests/tools/test_reflection.py +128 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
from dataclasses import dataclass
|
3
|
+
|
4
|
+
@dataclass
|
5
|
+
class Sqlite:
|
6
|
+
"""
|
7
|
+
Data class to represent the SQLite database configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
driver : str
|
12
|
+
The database driver being used, e.g., 'sqlite'.
|
13
|
+
url : str
|
14
|
+
The URL for connecting to the database.
|
15
|
+
database : str
|
16
|
+
The path to the SQLite database file.
|
17
|
+
prefix : str
|
18
|
+
Prefix for table names.
|
19
|
+
foreign_key_constraints : bool
|
20
|
+
Whether foreign key constraints are enabled.
|
21
|
+
busy_timeout : Optional[int]
|
22
|
+
The timeout period (in milliseconds) before retrying a locked database.
|
23
|
+
journal_mode : Optional[str]
|
24
|
+
The journal mode used for transactions.
|
25
|
+
synchronous : Optional[str]
|
26
|
+
The synchronization level for the database.
|
27
|
+
"""
|
28
|
+
driver: str
|
29
|
+
url: str
|
30
|
+
database: str
|
31
|
+
prefix: str
|
32
|
+
foreign_key_constraints: bool
|
33
|
+
busy_timeout: Optional[int]
|
34
|
+
journal_mode: Optional[str]
|
35
|
+
synchronous: Optional[str]
|
36
|
+
|
37
|
+
@dataclass
|
38
|
+
class Mysql:
|
39
|
+
"""
|
40
|
+
Data class to represent the MySQL database configuration.
|
41
|
+
|
42
|
+
Attributes
|
43
|
+
----------
|
44
|
+
driver : str
|
45
|
+
The database driver being used, e.g., 'mysql'.
|
46
|
+
url : str
|
47
|
+
The URL for connecting to the database.
|
48
|
+
host : str
|
49
|
+
The host address for the MySQL server.
|
50
|
+
port : str
|
51
|
+
The port for connecting to the MySQL server.
|
52
|
+
database : str
|
53
|
+
The name of the MySQL database.
|
54
|
+
username : str
|
55
|
+
The username for connecting to the MySQL database.
|
56
|
+
password : str
|
57
|
+
The password for the MySQL database.
|
58
|
+
unix_socket : str
|
59
|
+
The path to the Unix socket for MySQL connections (optional).
|
60
|
+
charset : str
|
61
|
+
The charset used for the connection.
|
62
|
+
collation : str
|
63
|
+
The collation for the database.
|
64
|
+
prefix : str
|
65
|
+
Prefix for table names.
|
66
|
+
prefix_indexes : bool
|
67
|
+
Whether to prefix index names.
|
68
|
+
strict : bool
|
69
|
+
Whether to enforce strict SQL mode.
|
70
|
+
engine : Optional[str]
|
71
|
+
The storage engine for the MySQL database (optional).
|
72
|
+
"""
|
73
|
+
driver: str
|
74
|
+
url: str
|
75
|
+
host: str
|
76
|
+
port: str
|
77
|
+
database: str
|
78
|
+
username: str
|
79
|
+
password: str
|
80
|
+
unix_socket: str
|
81
|
+
charset: str
|
82
|
+
collation: str
|
83
|
+
prefix: str
|
84
|
+
prefix_indexes: bool
|
85
|
+
strict: bool
|
86
|
+
engine: Optional[str]
|
87
|
+
|
88
|
+
@dataclass
|
89
|
+
class Pgsql:
|
90
|
+
"""
|
91
|
+
Data class to represent the PostgreSQL database configuration.
|
92
|
+
|
93
|
+
Attributes
|
94
|
+
----------
|
95
|
+
driver : str
|
96
|
+
The database driver being used, e.g., 'pgsql'.
|
97
|
+
url : str
|
98
|
+
The URL for connecting to the database.
|
99
|
+
host : str
|
100
|
+
The host address for the PostgreSQL server.
|
101
|
+
port : str
|
102
|
+
The port for connecting to the PostgreSQL server.
|
103
|
+
database : str
|
104
|
+
The name of the PostgreSQL database.
|
105
|
+
username : str
|
106
|
+
The username for connecting to the PostgreSQL database.
|
107
|
+
password : str
|
108
|
+
The password for the PostgreSQL database.
|
109
|
+
charset : str
|
110
|
+
The charset used for the connection.
|
111
|
+
prefix : str
|
112
|
+
Prefix for table names.
|
113
|
+
prefix_indexes : bool
|
114
|
+
Whether to prefix index names.
|
115
|
+
search_path : str
|
116
|
+
The schema search path for PostgreSQL.
|
117
|
+
sslmode : str
|
118
|
+
The SSL mode for the connection.
|
119
|
+
"""
|
120
|
+
driver: str
|
121
|
+
url: str
|
122
|
+
host: str
|
123
|
+
port: str
|
124
|
+
database: str
|
125
|
+
username: str
|
126
|
+
password: str
|
127
|
+
charset: str
|
128
|
+
prefix: str
|
129
|
+
prefix_indexes: bool
|
130
|
+
search_path: str
|
131
|
+
sslmode: str
|
132
|
+
|
133
|
+
@dataclass
|
134
|
+
class Oracle:
|
135
|
+
"""
|
136
|
+
Data class to represent the Oracle database configuration.
|
137
|
+
|
138
|
+
Attributes
|
139
|
+
----------
|
140
|
+
driver : str
|
141
|
+
The database driver being used, e.g., 'oracle'.
|
142
|
+
dsn : str
|
143
|
+
The Data Source Name (DSN) for connecting to the Oracle database.
|
144
|
+
host : str
|
145
|
+
The host address for the Oracle server.
|
146
|
+
port : str
|
147
|
+
The port for connecting to the Oracle server.
|
148
|
+
username : str
|
149
|
+
The username for connecting to the Oracle database.
|
150
|
+
password : str
|
151
|
+
The password for the Oracle database.
|
152
|
+
charset : str
|
153
|
+
The charset used for the connection.
|
154
|
+
service : str
|
155
|
+
The Oracle service name.
|
156
|
+
sid : str
|
157
|
+
The Oracle System Identifier (SID).
|
158
|
+
"""
|
159
|
+
driver: str
|
160
|
+
dsn: str
|
161
|
+
host: str
|
162
|
+
port: str
|
163
|
+
username: str
|
164
|
+
password: str
|
165
|
+
charset: str
|
166
|
+
service: str
|
167
|
+
sid: str
|
168
|
+
|
169
|
+
@dataclass
|
170
|
+
class Connections:
|
171
|
+
"""
|
172
|
+
Data class to represent all database connections used by the application.
|
173
|
+
|
174
|
+
Attributes
|
175
|
+
----------
|
176
|
+
sqlite : Sqlite
|
177
|
+
Configuration for the SQLite database connection.
|
178
|
+
mysql : Mysql
|
179
|
+
Configuration for the MySQL database connection.
|
180
|
+
pgsql : Pgsql
|
181
|
+
Configuration for the PostgreSQL database connection.
|
182
|
+
oracle : Oracle
|
183
|
+
Configuration for the Oracle database connection.
|
184
|
+
"""
|
185
|
+
sqlite: Sqlite
|
186
|
+
mysql: Mysql
|
187
|
+
pgsql: Pgsql
|
188
|
+
oracle: Oracle
|
189
|
+
|
190
|
+
@dataclass
|
191
|
+
class Database:
|
192
|
+
"""
|
193
|
+
Data class to represent the general database configuration.
|
194
|
+
|
195
|
+
Attributes
|
196
|
+
----------
|
197
|
+
default : str
|
198
|
+
The name of the default database connection to use.
|
199
|
+
connections : Connections
|
200
|
+
The different database connections available to the application.
|
201
|
+
"""
|
202
|
+
default: str
|
203
|
+
connections: Connections
|
@@ -0,0 +1,102 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from typing import Optional
|
3
|
+
|
4
|
+
@dataclass
|
5
|
+
class Local:
|
6
|
+
"""
|
7
|
+
Represents a local filesystem configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
path : str
|
12
|
+
The absolute or relative path where local files are stored.
|
13
|
+
"""
|
14
|
+
path: str
|
15
|
+
|
16
|
+
|
17
|
+
@dataclass
|
18
|
+
class Public:
|
19
|
+
"""
|
20
|
+
Represents a public filesystem configuration.
|
21
|
+
|
22
|
+
Attributes
|
23
|
+
----------
|
24
|
+
path : str
|
25
|
+
The public-facing path where files are stored.
|
26
|
+
slug : str
|
27
|
+
A unique identifier for the public storage location.
|
28
|
+
"""
|
29
|
+
path: str
|
30
|
+
slug: str
|
31
|
+
|
32
|
+
|
33
|
+
@dataclass
|
34
|
+
class AWSS3:
|
35
|
+
"""
|
36
|
+
Represents an AWS S3 storage configuration.
|
37
|
+
|
38
|
+
Attributes
|
39
|
+
----------
|
40
|
+
driver : str
|
41
|
+
The storage driver (default: 's3').
|
42
|
+
key : str
|
43
|
+
AWS access key ID.
|
44
|
+
secret : str
|
45
|
+
AWS secret access key.
|
46
|
+
region : str
|
47
|
+
AWS region where the bucket is located.
|
48
|
+
bucket : str
|
49
|
+
The S3 bucket name.
|
50
|
+
url : Optional[str], default=None
|
51
|
+
The URL endpoint for accessing the S3 bucket.
|
52
|
+
endpoint : Optional[str], default=None
|
53
|
+
The AWS S3 endpoint URL.
|
54
|
+
use_path_style_endpoint : bool, default=False
|
55
|
+
Whether to use a path-style endpoint.
|
56
|
+
throw : bool, default=False
|
57
|
+
Whether to raise an exception on errors.
|
58
|
+
"""
|
59
|
+
key: str = ""
|
60
|
+
secret: str = ""
|
61
|
+
region: str = "us-east-1"
|
62
|
+
bucket: str = ""
|
63
|
+
url: Optional[str] = None
|
64
|
+
endpoint: Optional[str] = None
|
65
|
+
use_path_style_endpoint: bool = False
|
66
|
+
throw: bool = False
|
67
|
+
|
68
|
+
|
69
|
+
@dataclass
|
70
|
+
class Disks:
|
71
|
+
"""
|
72
|
+
Represents the available storage disks.
|
73
|
+
|
74
|
+
Attributes
|
75
|
+
----------
|
76
|
+
local : Local
|
77
|
+
Configuration for local storage.
|
78
|
+
public : Public
|
79
|
+
Configuration for public storage.
|
80
|
+
s3 : AWSS3
|
81
|
+
Configuration for AWS S3 storage.
|
82
|
+
"""
|
83
|
+
local: Local
|
84
|
+
public: Public
|
85
|
+
s3: AWSS3
|
86
|
+
|
87
|
+
|
88
|
+
@dataclass
|
89
|
+
class Filesystems:
|
90
|
+
"""
|
91
|
+
Represents the filesystem configuration, supporting multiple storage disks.
|
92
|
+
|
93
|
+
Attributes
|
94
|
+
----------
|
95
|
+
default : str
|
96
|
+
The default storage disk to use.
|
97
|
+
disks : Disks
|
98
|
+
A collection of configured storage disks.
|
99
|
+
"""
|
100
|
+
|
101
|
+
default: str
|
102
|
+
disks: Disks
|
@@ -0,0 +1,107 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from typing import Any, Union
|
3
|
+
|
4
|
+
@dataclass
|
5
|
+
class Single:
|
6
|
+
"""
|
7
|
+
Represents a single log file configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
path : str
|
12
|
+
The file path where the log is stored.
|
13
|
+
level : str
|
14
|
+
The logging level (e.g., 'info', 'error', 'debug').
|
15
|
+
stream : bool
|
16
|
+
Whether to output logs to the console.
|
17
|
+
"""
|
18
|
+
path: str
|
19
|
+
level: str
|
20
|
+
stream: bool
|
21
|
+
|
22
|
+
|
23
|
+
@dataclass
|
24
|
+
class Daily:
|
25
|
+
"""
|
26
|
+
Represents a daily log file rotation configuration.
|
27
|
+
|
28
|
+
Attributes
|
29
|
+
----------
|
30
|
+
path : str
|
31
|
+
The file path where daily logs are stored.
|
32
|
+
level : str
|
33
|
+
The logging level (e.g., 'info', 'error', 'debug').
|
34
|
+
days : int
|
35
|
+
The number of days to retain log files before deletion.
|
36
|
+
stream : bool
|
37
|
+
Whether to output logs to the console.
|
38
|
+
"""
|
39
|
+
path: str
|
40
|
+
level: str
|
41
|
+
days: int
|
42
|
+
stream: bool
|
43
|
+
|
44
|
+
|
45
|
+
@dataclass
|
46
|
+
class Chunked:
|
47
|
+
"""
|
48
|
+
Represents a chunked log file configuration.
|
49
|
+
|
50
|
+
This configuration ensures that log files are split into manageable chunks
|
51
|
+
based on size or number of files to prevent excessive file growth.
|
52
|
+
|
53
|
+
Attributes
|
54
|
+
----------
|
55
|
+
path : str
|
56
|
+
The file path where chunked logs are stored.
|
57
|
+
level : str
|
58
|
+
The logging level (e.g., 'info', 'error', 'debug').
|
59
|
+
max_size : Union[int, str]
|
60
|
+
The maximum file size before creating a new chunk.
|
61
|
+
Can be an integer (bytes) or a string (e.g., '10MB', '500KB').
|
62
|
+
max_files : int
|
63
|
+
The maximum number of log files to retain before older files are deleted.
|
64
|
+
stream : bool
|
65
|
+
Whether to output logs to the console.
|
66
|
+
"""
|
67
|
+
|
68
|
+
path: str
|
69
|
+
level: str
|
70
|
+
max_size: Union[int, str] # Supports both numeric and formatted string sizes ('10MB')
|
71
|
+
max_files: int # Ensures only a certain number of log files are kept
|
72
|
+
stream: bool
|
73
|
+
|
74
|
+
|
75
|
+
@dataclass
|
76
|
+
class Channels:
|
77
|
+
"""
|
78
|
+
Represents the different logging channels available.
|
79
|
+
|
80
|
+
Attributes
|
81
|
+
----------
|
82
|
+
single : Single
|
83
|
+
Configuration for single log file storage.
|
84
|
+
daily : Daily
|
85
|
+
Configuration for daily log file rotation.
|
86
|
+
chunked : Chunked
|
87
|
+
Configuration for chunked log file storage.
|
88
|
+
"""
|
89
|
+
single: Single
|
90
|
+
daily: Daily
|
91
|
+
chunked: Chunked
|
92
|
+
|
93
|
+
|
94
|
+
@dataclass
|
95
|
+
class Logging:
|
96
|
+
"""
|
97
|
+
Represents the logging system configuration.
|
98
|
+
|
99
|
+
Attributes
|
100
|
+
----------
|
101
|
+
default : str
|
102
|
+
The default logging channel to use.
|
103
|
+
channels : Channels
|
104
|
+
A collection of available logging channels.
|
105
|
+
"""
|
106
|
+
default: str
|
107
|
+
channels: Channels
|
@@ -0,0 +1,81 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from typing import Optional
|
3
|
+
|
4
|
+
@dataclass
|
5
|
+
class Smtp:
|
6
|
+
"""
|
7
|
+
Represents SMTP (Simple Mail Transfer Protocol) configuration settings.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
url : str
|
12
|
+
The full URL for the SMTP service.
|
13
|
+
host : str
|
14
|
+
The hostname of the SMTP server (e.g., 'smtp.example.com').
|
15
|
+
port : int
|
16
|
+
The port number used for SMTP communication (e.g., 465, 587).
|
17
|
+
encryption : str
|
18
|
+
The encryption type used for secure communication (e.g., 'SSL', 'TLS', 'None').
|
19
|
+
username : str
|
20
|
+
The username for authentication with the SMTP server.
|
21
|
+
password : str
|
22
|
+
The password for authentication with the SMTP server.
|
23
|
+
timeout : Optional[int], default=None
|
24
|
+
The connection timeout duration in seconds. If None, defaults to the system setting.
|
25
|
+
"""
|
26
|
+
|
27
|
+
url: str
|
28
|
+
host: str
|
29
|
+
port: int
|
30
|
+
encryption: str
|
31
|
+
username: str
|
32
|
+
password: str
|
33
|
+
timeout: Optional[int] = None
|
34
|
+
|
35
|
+
|
36
|
+
@dataclass
|
37
|
+
class File:
|
38
|
+
"""
|
39
|
+
Represents email file-based storage configuration.
|
40
|
+
|
41
|
+
Attributes
|
42
|
+
----------
|
43
|
+
path : str
|
44
|
+
The file path where outgoing emails are stored instead of being sent.
|
45
|
+
"""
|
46
|
+
|
47
|
+
path: str
|
48
|
+
|
49
|
+
|
50
|
+
@dataclass
|
51
|
+
class Mailers:
|
52
|
+
"""
|
53
|
+
Represents the available mail transport configurations.
|
54
|
+
|
55
|
+
Attributes
|
56
|
+
----------
|
57
|
+
smtp : Smtp
|
58
|
+
The SMTP configuration used for sending emails.
|
59
|
+
file : File
|
60
|
+
The file-based mail transport configuration (used for local development/testing).
|
61
|
+
"""
|
62
|
+
|
63
|
+
smtp: Smtp
|
64
|
+
file: File
|
65
|
+
|
66
|
+
|
67
|
+
@dataclass
|
68
|
+
class Mail:
|
69
|
+
"""
|
70
|
+
Represents the overall mail configuration.
|
71
|
+
|
72
|
+
Attributes
|
73
|
+
----------
|
74
|
+
default : str
|
75
|
+
The default mailer transport to use (e.g., 'smtp', 'file').
|
76
|
+
mailers : Mailers
|
77
|
+
The available mail transport configurations.
|
78
|
+
"""
|
79
|
+
|
80
|
+
default: str
|
81
|
+
mailers: Mailers
|
@@ -0,0 +1,63 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
|
3
|
+
@dataclass
|
4
|
+
class Database:
|
5
|
+
"""
|
6
|
+
Represents the configuration for a database-backed queue connection.
|
7
|
+
|
8
|
+
Attributes
|
9
|
+
----------
|
10
|
+
driver : str
|
11
|
+
The queue driver type (default: 'database').
|
12
|
+
connection : Optional[str]
|
13
|
+
The database connection name used for storing queued jobs.
|
14
|
+
table : str
|
15
|
+
The table where queued jobs are stored.
|
16
|
+
batching : str
|
17
|
+
The table for storing batch job information.
|
18
|
+
failed : str
|
19
|
+
The table for storing failed jobs.
|
20
|
+
queue : str
|
21
|
+
The queue name used for processing jobs.
|
22
|
+
retry_after : int
|
23
|
+
The number of seconds before a job should be retried.
|
24
|
+
after_commit : bool
|
25
|
+
Whether to process jobs only after a successful database transaction commit.
|
26
|
+
"""
|
27
|
+
connection: str
|
28
|
+
table: str
|
29
|
+
batching: str
|
30
|
+
failed: str
|
31
|
+
queue: str
|
32
|
+
retry_after: int
|
33
|
+
after_commit: bool
|
34
|
+
|
35
|
+
|
36
|
+
@dataclass
|
37
|
+
class Connections:
|
38
|
+
"""
|
39
|
+
Represents available queue connection configurations.
|
40
|
+
|
41
|
+
Attributes
|
42
|
+
----------
|
43
|
+
database : DatabaseQueue
|
44
|
+
The configuration for the database-backed queue.
|
45
|
+
"""
|
46
|
+
|
47
|
+
database: Database
|
48
|
+
|
49
|
+
@dataclass
|
50
|
+
class Queue:
|
51
|
+
"""
|
52
|
+
Represents the overall queue system configuration.
|
53
|
+
|
54
|
+
Attributes
|
55
|
+
----------
|
56
|
+
default : str
|
57
|
+
The default queue connection to use.
|
58
|
+
connections : QueueConnections
|
59
|
+
The available queue connection configurations.
|
60
|
+
"""
|
61
|
+
|
62
|
+
default: str
|
63
|
+
connections: Connections
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from typing import Optional
|
3
|
+
|
4
|
+
@dataclass
|
5
|
+
class Cookie:
|
6
|
+
"""
|
7
|
+
Represents the session cookie configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
name : str
|
12
|
+
The name of the session cookie.
|
13
|
+
path : str
|
14
|
+
The path for which the session cookie is available.
|
15
|
+
domain : Optional[str]
|
16
|
+
The domain where the session cookie is accessible.
|
17
|
+
secure : Optional[bool]
|
18
|
+
Whether the session cookie should only be sent over HTTPS.
|
19
|
+
http_only : bool
|
20
|
+
Whether the session cookie is only accessible through HTTP (not JavaScript).
|
21
|
+
same_site : str
|
22
|
+
The SameSite policy for the session cookie ('lax', 'strict', or 'none').
|
23
|
+
"""
|
24
|
+
|
25
|
+
name: str
|
26
|
+
path: str
|
27
|
+
domain: Optional[str]
|
28
|
+
secure: Optional[bool]
|
29
|
+
http_only: bool
|
30
|
+
same_site: str
|
31
|
+
|
32
|
+
|
33
|
+
@dataclass
|
34
|
+
class Session:
|
35
|
+
"""
|
36
|
+
Represents the session management configuration.
|
37
|
+
|
38
|
+
Attributes
|
39
|
+
----------
|
40
|
+
driver : str
|
41
|
+
The session driver type (e.g., 'file', 'database', 'redis').
|
42
|
+
lifetime : int
|
43
|
+
The session lifetime in minutes before expiration.
|
44
|
+
expire_on_close : bool
|
45
|
+
Whether the session expires when the browser is closed.
|
46
|
+
encrypt : bool
|
47
|
+
Whether session data should be encrypted for additional security.
|
48
|
+
files : str
|
49
|
+
The file path where session data is stored when using the 'file' driver.
|
50
|
+
cookie : SessionCookie
|
51
|
+
The configuration settings for the session cookie.
|
52
|
+
"""
|
53
|
+
|
54
|
+
driver: str
|
55
|
+
lifetime: int
|
56
|
+
expire_on_close: bool
|
57
|
+
encrypt: bool
|
58
|
+
files: str
|
59
|
+
cookie: Cookie
|