orionis 0.419.0__py3-none-any.whl → 0.421.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.
Files changed (116) hide show
  1. orionis/__init__.py +0 -11
  2. orionis/foundation/config/app/entities/app.py +15 -14
  3. orionis/foundation/config/cache/entities/cache.py +2 -1
  4. orionis/foundation/config/cache/entities/file.py +1 -0
  5. orionis/foundation/config/cache/entities/stores.py +1 -0
  6. orionis/foundation/config/cors/entities/cors.py +1 -0
  7. orionis/foundation/config/database/entities/connections.py +5 -4
  8. orionis/foundation/config/database/entities/database.py +3 -2
  9. orionis/foundation/config/database/entities/mysql.py +7 -6
  10. orionis/foundation/config/database/entities/oracle.py +11 -10
  11. orionis/foundation/config/database/entities/pgsql.py +7 -6
  12. orionis/foundation/config/database/entities/sqlite.py +8 -7
  13. orionis/foundation/config/filesystems/entitites/aws.py +1 -0
  14. orionis/foundation/config/filesystems/entitites/disks.py +4 -3
  15. orionis/foundation/config/filesystems/entitites/filesystems.py +2 -1
  16. orionis/foundation/config/filesystems/entitites/local.py +1 -0
  17. orionis/foundation/config/filesystems/entitites/public.py +1 -0
  18. orionis/foundation/config/logging/entities/channels.py +7 -6
  19. orionis/foundation/config/logging/entities/chunked.py +1 -0
  20. orionis/foundation/config/logging/entities/daily.py +3 -2
  21. orionis/foundation/config/logging/entities/hourly.py +1 -0
  22. orionis/foundation/config/logging/entities/logging.py +2 -1
  23. orionis/foundation/config/logging/entities/monthly.py +1 -0
  24. orionis/foundation/config/logging/entities/stack.py +1 -0
  25. orionis/foundation/config/logging/entities/weekly.py +1 -0
  26. orionis/foundation/config/mail/entities/mail.py +1 -1
  27. orionis/foundation/config/mail/entities/mailers.py +2 -2
  28. orionis/foundation/config/queue/entities/brokers.py +2 -1
  29. orionis/foundation/config/queue/entities/database.py +1 -0
  30. orionis/foundation/config/queue/entities/queue.py +2 -1
  31. orionis/foundation/config/roots/paths.py +63 -62
  32. orionis/foundation/config/session/entities/session.py +9 -8
  33. orionis/foundation/config/startup.py +13 -12
  34. orionis/foundation/config/testing/entities/testing.py +2 -1
  35. orionis/metadata/framework.py +1 -1
  36. orionis/support/entities/base.py +25 -0
  37. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/METADATA +1 -1
  38. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/RECORD +43 -116
  39. tests/foundation/config/root/test_foundation_config_root_paths.py +4 -1
  40. orionis/_contracts/__init__.py +0 -0
  41. orionis/_contracts/application.py +0 -41
  42. orionis/_contracts/config/__init__.py +0 -0
  43. orionis/_contracts/config/config.py +0 -27
  44. orionis/_contracts/console/__init__.py +0 -0
  45. orionis/_contracts/console/base/__init__.py +0 -0
  46. orionis/_contracts/console/base/command.py +0 -437
  47. orionis/_contracts/console/command_filter.py +0 -32
  48. orionis/_contracts/console/kernel.py +0 -32
  49. orionis/_contracts/console/output/__init__.py +0 -0
  50. orionis/_contracts/console/output/console.py +0 -421
  51. orionis/_contracts/console/output/executor.py +0 -51
  52. orionis/_contracts/console/parser.py +0 -75
  53. orionis/_contracts/console/task_manager.py +0 -37
  54. orionis/_contracts/facades/__init__.py +0 -0
  55. orionis/_contracts/facades/commands/__init__.py +0 -0
  56. orionis/_contracts/facades/commands/commands_facade.py +0 -40
  57. orionis/_contracts/facades/commands/scheduler_facade.py +0 -28
  58. orionis/_contracts/facades/config/__init__.py +0 -0
  59. orionis/_contracts/facades/config/config_facade.py +0 -37
  60. orionis/_contracts/facades/environment/__init__.py +0 -0
  61. orionis/_contracts/facades/environment/environment_facade.py +0 -74
  62. orionis/_contracts/facades/facade.py +0 -38
  63. orionis/_contracts/facades/files/__init__.py +0 -0
  64. orionis/_contracts/facades/files/path_facade.py +0 -148
  65. orionis/_contracts/facades/log/__init__.py +0 -0
  66. orionis/_contracts/facades/log/log_facade.py +0 -83
  67. orionis/_contracts/facades/tests/__init__.py +0 -0
  68. orionis/_contracts/facades/tests/tests_facade.py +0 -30
  69. orionis/_contracts/foundation/__init__.py +0 -0
  70. orionis/_contracts/foundation/bootstraper.py +0 -41
  71. orionis/_contracts/foundation/config/__init__.py +0 -0
  72. orionis/_contracts/foundation/config/config_bootstrapper.py +0 -140
  73. orionis/_contracts/foundation/console/__init__.py +0 -0
  74. orionis/_contracts/foundation/console/command_bootstrapper.py +0 -81
  75. orionis/_contracts/foundation/environment/__init__.py +0 -0
  76. orionis/_contracts/foundation/environment/environment_bootstrapper.py +0 -33
  77. orionis/_contracts/foundation/providers/__init__.py +0 -0
  78. orionis/_contracts/foundation/providers/service_providers_bootstrapper.py +0 -47
  79. orionis/_contracts/providers/__init__.py +0 -0
  80. orionis/_contracts/providers/service_provider.py +0 -14
  81. orionis/_contracts/services/__init__.py +0 -0
  82. orionis/_contracts/services/commands/__init__.py +0 -0
  83. orionis/_contracts/services/commands/reactor_commands_service.py +0 -23
  84. orionis/_contracts/services/commands/schedule_service.py +0 -317
  85. orionis/_contracts/services/config/__init__.py +0 -0
  86. orionis/_contracts/services/config/config_service.py +0 -37
  87. orionis/_contracts/services/environment/__init__.py +0 -0
  88. orionis/_contracts/services/environment/environment_service.py +0 -74
  89. orionis/_contracts/services/files/__init__.py +0 -0
  90. orionis/_contracts/services/files/path_resolver_service.py +0 -29
  91. orionis/_contracts/services/log/__init__.py +0 -0
  92. orionis/_contracts/services/log/log_service.py +0 -89
  93. orionis/_contracts/support/exception_parse.py +0 -26
  94. orionis/_contracts/support/reflection.py +0 -352
  95. orionis/_foundation/__init__.py +0 -0
  96. orionis/_foundation/console/__init__.py +0 -0
  97. orionis/_foundation/console/command_bootstrapper.py +0 -175
  98. orionis/_foundation/environment/__init__.py +0 -0
  99. orionis/_foundation/environment/environment_bootstrapper.py +0 -76
  100. orionis/_foundation/exceptions/__init__.py +0 -0
  101. orionis/_foundation/exceptions/exception_bootstrapper.py +0 -54
  102. orionis/_foundation/exceptions/exception_providers.py +0 -54
  103. orionis/_foundation/foundation/config/__init__.py +0 -0
  104. orionis/_foundation/foundation/config/config_bootstrapper.py +0 -209
  105. orionis/_foundation/providers/__init__.py +0 -0
  106. orionis/_foundation/providers/service_providers_bootstrapper.py +0 -107
  107. orionis/_services/__init__.py +0 -0
  108. orionis/_services/commands/__init__.py +0 -0
  109. orionis/_services/commands/reactor_commands_service.py +0 -148
  110. orionis/_services/commands/scheduler_service.py +0 -611
  111. orionis/_services/config/__init__.py +0 -0
  112. orionis/_services/config/config_service.py +0 -72
  113. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/WHEEL +0 -0
  114. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/licenses/LICENCE +0 -0
  115. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/top_level.txt +0 -0
  116. {orionis-0.419.0.dist-info → orionis-0.421.0.dist-info}/zip-safe +0 -0
orionis/__init__.py CHANGED
@@ -1,11 +0,0 @@
1
- from orionis.foundation.application import (
2
- Application as Orionis,
3
- IApplication as IOrionis,
4
- Configuration as Config
5
- )
6
-
7
- __all__ = [
8
- "Orionis",
9
- "IOrionis",
10
- "Config"
11
- ]
@@ -47,7 +47,7 @@ class App(BaseEntity):
47
47
  """
48
48
 
49
49
  name: str = field(
50
- default = Env.get('APP_NAME', 'Orionis Application'),
50
+ default_factory = lambda: Env.get('APP_NAME', 'Orionis Application'),
51
51
  metadata = {
52
52
  "description": "The name of the application. Defaults to 'Orionis Application'.",
53
53
  "default": 'Orionis Application'
@@ -55,7 +55,7 @@ class App(BaseEntity):
55
55
  )
56
56
 
57
57
  env: str | Environments = field(
58
- default = Env.get('APP_ENV', Environments.DEVELOPMENT.value),
58
+ default_factory = lambda: Env.get('APP_ENV', Environments.DEVELOPMENT.value),
59
59
  metadata = {
60
60
  "description": "The environment in which the application is running. Defaults to 'DEVELOPMENT'.",
61
61
  "default": Environments.DEVELOPMENT.value
@@ -63,7 +63,7 @@ class App(BaseEntity):
63
63
  )
64
64
 
65
65
  debug: bool = field(
66
- default = Env.get('APP_DEBUG', True),
66
+ default_factory = lambda: Env.get('APP_DEBUG', True),
67
67
  metadata = {
68
68
  "description": "Flag indicating whether debug mode is enabled. Defaults to False.",
69
69
  "default": True
@@ -71,7 +71,7 @@ class App(BaseEntity):
71
71
  )
72
72
 
73
73
  url: str = field(
74
- default = Env.get('APP_URL', 'http://127.0.0.1'),
74
+ default_factory = lambda: Env.get('APP_URL', 'http://127.0.0.1'),
75
75
  metadata = {
76
76
  "description": "The base URL of the application. Defaults to 'http://127.0.0.1'.",
77
77
  "default": 'http://127.0.0.1'
@@ -79,7 +79,7 @@ class App(BaseEntity):
79
79
  )
80
80
 
81
81
  port: int = field(
82
- default = Env.get('APP_PORT', 8000),
82
+ default_factory = lambda: Env.get('APP_PORT', 8000),
83
83
  metadata = {
84
84
  "description": "The port on which the application will run. Defaults to 8000.",
85
85
  "default": 8000
@@ -87,15 +87,15 @@ class App(BaseEntity):
87
87
  )
88
88
 
89
89
  workers: int = field(
90
- default = Env.get('APP_WORKERS', Workers().calculate()),
90
+ default_factory = lambda: Env.get('APP_WORKERS', Workers().calculate()),
91
91
  metadata = {
92
92
  "description": "The number of worker processes to handle requests. Defaults to the maximum available workers.",
93
- "default": Workers().calculate()
93
+ "default": lambda: Workers().calculate()
94
94
  }
95
95
  )
96
96
 
97
97
  reload: bool = field(
98
- default = Env.get('APP_RELOAD', True),
98
+ default_factory = lambda: Env.get('APP_RELOAD', True),
99
99
  metadata = {
100
100
  "description": "Flag indicating whether the application should reload on code changes. Defaults to True.",
101
101
  "default": True
@@ -103,7 +103,7 @@ class App(BaseEntity):
103
103
  )
104
104
 
105
105
  timezone: str = field(
106
- default = Env.get('APP_TIMEZONE', 'UTC'),
106
+ default_factory = lambda: Env.get('APP_TIMEZONE', 'UTC'),
107
107
  metadata = {
108
108
  "description": "The timezone of the application. Defaults to 'UTC'.",
109
109
  "default": 'UTC'
@@ -111,7 +111,7 @@ class App(BaseEntity):
111
111
  )
112
112
 
113
113
  locale: str = field(
114
- default = Env.get('APP_LOCALE', 'en'),
114
+ default_factory = lambda: Env.get('APP_LOCALE', 'en'),
115
115
  metadata = {
116
116
  "description": "The locale for the application. Defaults to 'en'.",
117
117
  "default": 'en'
@@ -119,7 +119,7 @@ class App(BaseEntity):
119
119
  )
120
120
 
121
121
  fallback_locale: str = field(
122
- default = Env.get('APP_FALLBACK_LOCALE', 'en'),
122
+ default_factory = lambda: Env.get('APP_FALLBACK_LOCALE', 'en'),
123
123
  metadata = {
124
124
  "description": "The fallback locale for the application. Defaults to 'en'.",
125
125
  "default": 'en'
@@ -127,7 +127,7 @@ class App(BaseEntity):
127
127
  )
128
128
 
129
129
  cipher: str | Cipher = field(
130
- default = Env.get('APP_CIPHER', Cipher.AES_256_CBC.value),
130
+ default_factory = lambda: Env.get('APP_CIPHER', Cipher.AES_256_CBC.value),
131
131
  metadata = {
132
132
  "description": "The cipher used for encryption. Defaults to 'AES_256_CBC'.",
133
133
  "default": Cipher.AES_256_CBC.value
@@ -135,7 +135,7 @@ class App(BaseEntity):
135
135
  )
136
136
 
137
137
  key: str = field(
138
- default = Env.get('APP_KEY'),
138
+ default_factory = lambda: Env.get('APP_KEY'),
139
139
  metadata = {
140
140
  "description": "The encryption key for the application. Defaults to None.",
141
141
  "default": None
@@ -143,7 +143,7 @@ class App(BaseEntity):
143
143
  )
144
144
 
145
145
  maintenance: str = field(
146
- default = Env.get('APP_MAINTENANCE', '/maintenance'),
146
+ default_factory = lambda: Env.get('APP_MAINTENANCE', '/maintenance'),
147
147
  metadata = {
148
148
  "description": "The maintenance configuration for the application. Defaults to '/maintenance'.",
149
149
  "default": '/maintenance'
@@ -151,6 +151,7 @@ class App(BaseEntity):
151
151
  )
152
152
 
153
153
  def __post_init__(self):
154
+ super().__post_init__()
154
155
  """
155
156
  Validate and normalize attributes after dataclass initialization.
156
157
 
@@ -24,7 +24,7 @@ class Cache(BaseEntity):
24
24
  """
25
25
 
26
26
  default: Drivers | str = field(
27
- default_factory = lambda : Env.get("CACHE_STORE", Drivers.MEMORY),
27
+ default_factory = lambda : Env.get("CACHE_STORE", Drivers.MEMORY.value),
28
28
  metadata = {
29
29
  "description": "The default cache storage type. Can be a member of the Drivers enum or a string (e.g., 'memory', 'file').",
30
30
  "default": Drivers.MEMORY.value
@@ -40,6 +40,7 @@ class Cache(BaseEntity):
40
40
  )
41
41
 
42
42
  def __post_init__(self):
43
+ super().__post_init__()
43
44
  """
44
45
  Post-initialization method for validating and normalizing cache configuration.
45
46
 
@@ -26,6 +26,7 @@ class File(BaseEntity):
26
26
  )
27
27
 
28
28
  def __post_init__(self):
29
+ super().__post_init__()
29
30
  """
30
31
  Validates the 'path' attribute after dataclass initialization.
31
32
 
@@ -28,6 +28,7 @@ class Stores(BaseEntity):
28
28
  )
29
29
 
30
30
  def __post_init__(self):
31
+ super().__post_init__()
31
32
  """
32
33
  Post-initialization method to validate the 'file' attribute.
33
34
 
@@ -81,6 +81,7 @@ class Cors(BaseEntity):
81
81
  )
82
82
 
83
83
  def __post_init__(self):
84
+ super().__post_init__()
84
85
  """
85
86
  Validates the types of CORS configuration attributes after initialization.
86
87
 
@@ -26,7 +26,7 @@ class Connections(BaseEntity):
26
26
  default_factory = lambda: SQLite(),
27
27
  metadata = {
28
28
  "description": "SQLite database connection configuration",
29
- "default": SQLite().toDict()
29
+ "default": lambda: SQLite().toDict()
30
30
  }
31
31
  )
32
32
 
@@ -34,7 +34,7 @@ class Connections(BaseEntity):
34
34
  default_factory = lambda: MySQL(),
35
35
  metadata = {
36
36
  "description": "MySQL database connection configuration",
37
- "default": MySQL().toDict()
37
+ "default": lambda: MySQL().toDict()
38
38
  }
39
39
  )
40
40
 
@@ -42,7 +42,7 @@ class Connections(BaseEntity):
42
42
  default_factory = lambda: PGSQL(),
43
43
  metadata = {
44
44
  "description": "PostgreSQL database connection configuration",
45
- "default": PGSQL().toDict()
45
+ "default": lambda: PGSQL().toDict()
46
46
  }
47
47
  )
48
48
 
@@ -50,11 +50,12 @@ class Connections(BaseEntity):
50
50
  default_factory = lambda: Oracle(),
51
51
  metadata = {
52
52
  "description": "Oracle database connection configuration",
53
- "default": Oracle().toDict()
53
+ "default": lambda: Oracle().toDict()
54
54
  }
55
55
  )
56
56
 
57
57
  def __post_init__(self):
58
+ super().__post_init__()
58
59
  """
59
60
  Post-initialization method to validate the types of database connection attributes.
60
61
  Ensures that the attributes `sqlite`, `mysql`, `pgsql`, and `oracle` are instances of their respective classes.
@@ -17,7 +17,7 @@ class Database(BaseEntity):
17
17
  The different database connections available to the application.
18
18
  """
19
19
  default: str = field(
20
- default = Env.get("DB_CONNECTION", "sqlite"),
20
+ default_factory = lambda: Env.get("DB_CONNECTION", "sqlite"),
21
21
  metadata={
22
22
  "description": "Default database connection name",
23
23
  "default": "sqlite"
@@ -28,11 +28,12 @@ class Database(BaseEntity):
28
28
  default_factory = lambda: Connections(),
29
29
  metadata={
30
30
  "description": "Database connections",
31
- "default": Connections().toDict()
31
+ "default": lambda: Connections().toDict()
32
32
  }
33
33
  )
34
34
 
35
35
  def __post_init__(self):
36
+ super().__post_init__()
36
37
  """
37
38
  Post-initialization method for validating and normalizing the 'default' and 'connections' attributes.
38
39
  Validates that the 'default' attribute is either a valid string corresponding to a member of DatabaseConnections
@@ -53,7 +53,7 @@ class MySQL(BaseEntity):
53
53
  )
54
54
 
55
55
  host: str = field(
56
- default = Env.get("DB_HOST", "127.0.0.1"),
56
+ default_factory = lambda: Env.get("DB_HOST", "127.0.0.1"),
57
57
  metadata = {
58
58
  "description": "The host address for the MySQL server.",
59
59
  "default": "127.0.0.1"
@@ -61,7 +61,7 @@ class MySQL(BaseEntity):
61
61
  )
62
62
 
63
63
  port: int = field(
64
- default = Env.get("DB_PORT", 3306),
64
+ default_factory = lambda: Env.get("DB_PORT", 3306),
65
65
  metadata = {
66
66
  "description": "The port for connecting to the MySQL server.",
67
67
  "default": 3306
@@ -69,7 +69,7 @@ class MySQL(BaseEntity):
69
69
  )
70
70
 
71
71
  database: str = field(
72
- default = Env.get("DB_DATABASE", "orionis"),
72
+ default_factory = lambda: Env.get("DB_DATABASE", "orionis"),
73
73
  metadata = {
74
74
  "description": "The name of the MySQL database.",
75
75
  "default": "orionis"
@@ -77,7 +77,7 @@ class MySQL(BaseEntity):
77
77
  )
78
78
 
79
79
  username: str = field(
80
- default = Env.get("DB_USERNAME", "root"),
80
+ default_factory = lambda: Env.get("DB_USERNAME", "root"),
81
81
  metadata = {
82
82
  "description": "The username for connecting to the MySQL database.",
83
83
  "default": "root"
@@ -85,7 +85,7 @@ class MySQL(BaseEntity):
85
85
  )
86
86
 
87
87
  password: str = field(
88
- default = Env.get("DB_PASSWORD", ""),
88
+ default_factory = lambda: Env.get("DB_PASSWORD", ""),
89
89
  metadata = {
90
90
  "description": "The password for the MySQL database.",
91
91
  "default": ""
@@ -93,7 +93,7 @@ class MySQL(BaseEntity):
93
93
  )
94
94
 
95
95
  unix_socket: str = field(
96
- default = Env.get("DB_SOCKET", ""),
96
+ default_factory = lambda: Env.get("DB_SOCKET", ""),
97
97
  metadata = {
98
98
  "description": "The path to the Unix socket for MySQL connections (optional).",
99
99
  "default": ""
@@ -149,6 +149,7 @@ class MySQL(BaseEntity):
149
149
  )
150
150
 
151
151
  def __post_init__(self):
152
+ super().__post_init__()
152
153
  """
153
154
  Post-initialization validation for MySQL database entity configuration.
154
155
  This method performs comprehensive validation on the instance attributes to ensure
@@ -46,7 +46,7 @@ class Oracle(BaseEntity):
46
46
  )
47
47
 
48
48
  username: str = field(
49
- default = Env.get("DB_USERNAME", "sys"),
49
+ default_factory = lambda: Env.get("DB_USERNAME", "sys"),
50
50
  metadata = {
51
51
  "description": "Oracle DB username.",
52
52
  "default": "sys"
@@ -54,7 +54,7 @@ class Oracle(BaseEntity):
54
54
  )
55
55
 
56
56
  password: str = field(
57
- default = Env.get("DB_PASSWORD", ""),
57
+ default_factory = lambda: Env.get("DB_PASSWORD", ""),
58
58
  metadata = {
59
59
  "description": "Oracle DB password.",
60
60
  "default": ""
@@ -62,7 +62,7 @@ class Oracle(BaseEntity):
62
62
  )
63
63
 
64
64
  host: str = field(
65
- default = Env.get("DB_HOST", "localhost"),
65
+ default_factory = lambda: Env.get("DB_HOST", "localhost"),
66
66
  metadata = {
67
67
  "description": "Oracle DB host address.",
68
68
  "default": "localhost"
@@ -70,7 +70,7 @@ class Oracle(BaseEntity):
70
70
  )
71
71
 
72
72
  port: int = field(
73
- default = Env.get("DB_PORT", 1521),
73
+ default_factory = lambda: Env.get("DB_PORT", 1521),
74
74
  metadata = {
75
75
  "description": "Oracle DB listener port.",
76
76
  "default": 1521
@@ -78,7 +78,7 @@ class Oracle(BaseEntity):
78
78
  )
79
79
 
80
80
  service_name: Optional[str] = field(
81
- default = Env.get("DB_SERVICE_NAME", "ORCL"),
81
+ default_factory = lambda: Env.get("DB_SERVICE_NAME", "ORCL"),
82
82
  metadata = {
83
83
  "description": "Service name for Oracle DB.",
84
84
  "default": "ORCL"
@@ -86,7 +86,7 @@ class Oracle(BaseEntity):
86
86
  )
87
87
 
88
88
  sid: Optional[str] = field(
89
- default = Env.get("DB_SID", None),
89
+ default_factory = lambda: Env.get("DB_SID", None),
90
90
  metadata = {
91
91
  "description": "SID for Oracle DB.",
92
92
  "default": None
@@ -94,7 +94,7 @@ class Oracle(BaseEntity):
94
94
  )
95
95
 
96
96
  dsn: Optional[str] = field(
97
- default = Env.get("DB_DSN", None),
97
+ default_factory = lambda: Env.get("DB_DSN", None),
98
98
  metadata = {
99
99
  "description": "DSN string (overrides host/port/service/sid).",
100
100
  "default": None
@@ -102,7 +102,7 @@ class Oracle(BaseEntity):
102
102
  )
103
103
 
104
104
  tns_name: Optional[str] = field(
105
- default = Env.get("DB_TNS", None),
105
+ default_factory = lambda: Env.get("DB_TNS", None),
106
106
  metadata = {
107
107
  "description": "TNS alias defined in tnsnames.ora file.",
108
108
  "default": None
@@ -110,7 +110,7 @@ class Oracle(BaseEntity):
110
110
  )
111
111
 
112
112
  encoding: str | OracleEncoding = field(
113
- default = Env.get("DB_ENCODING", OracleEncoding.AL32UTF8.value),
113
+ default_factory = lambda: Env.get("DB_ENCODING", OracleEncoding.AL32UTF8.value),
114
114
  metadata = {
115
115
  "description": "Database charset (CHAR/VARCHAR2)",
116
116
  "default": OracleEncoding.AL32UTF8.value
@@ -118,7 +118,7 @@ class Oracle(BaseEntity):
118
118
  )
119
119
 
120
120
  nencoding: str | OracleNencoding = field(
121
- default = Env.get("DB_NENCODING", OracleNencoding.AL32UTF8.value),
121
+ default_factory = lambda: Env.get("DB_NENCODING", OracleNencoding.AL32UTF8.value),
122
122
  metadata = {
123
123
  "description": "Database charset (NCHAR/NVARCHAR2)",
124
124
  "default": OracleNencoding.AL32UTF8.value
@@ -126,6 +126,7 @@ class Oracle(BaseEntity):
126
126
  )
127
127
 
128
128
  def __post_init__(self):
129
+ super().__post_init__()
129
130
  """
130
131
  Post-initialization validation for Oracle database connection entity.
131
132
  This method performs strict validation on the configuration fields required to establish
@@ -35,7 +35,7 @@ class PGSQL(BaseEntity):
35
35
  )
36
36
 
37
37
  host: str = field(
38
- default = Env.get("DB_HOST", "127.0.0.1"),
38
+ default_factory = lambda: Env.get("DB_HOST", "127.0.0.1"),
39
39
  metadata = {
40
40
  "description": "Database host",
41
41
  "default": "127.0.0.1"
@@ -43,7 +43,7 @@ class PGSQL(BaseEntity):
43
43
  )
44
44
 
45
45
  port: str | int = field(
46
- default = Env.get("DB_PORT", 5432),
46
+ default_factory = lambda: Env.get("DB_PORT", 5432),
47
47
  metadata = {
48
48
  "description": "Database port",
49
49
  "default": 5432
@@ -51,7 +51,7 @@ class PGSQL(BaseEntity):
51
51
  )
52
52
 
53
53
  database: str = field(
54
- default = Env.get("DB_DATABASE", "orionis"),
54
+ default_factory = lambda: Env.get("DB_DATABASE", "orionis"),
55
55
  metadata = {
56
56
  "description": "Database name",
57
57
  "default": "orionis"
@@ -59,7 +59,7 @@ class PGSQL(BaseEntity):
59
59
  )
60
60
 
61
61
  username: str = field(
62
- default = Env.get("DB_USERNAME", "postgres"),
62
+ default_factory = lambda: Env.get("DB_USERNAME", "postgres"),
63
63
  metadata = {
64
64
  "description": "Database user",
65
65
  "default": "postgres"
@@ -67,7 +67,7 @@ class PGSQL(BaseEntity):
67
67
  )
68
68
 
69
69
  password: str = field(
70
- default = Env.get("DB_PASSWORD", ""),
70
+ default_factory = lambda: Env.get("DB_PASSWORD", ""),
71
71
  metadata = {
72
72
  "description": "Database password",
73
73
  "default": ""
@@ -75,7 +75,7 @@ class PGSQL(BaseEntity):
75
75
  )
76
76
 
77
77
  charset: str | PGSQLCharset = field(
78
- default = Env.get("DB_CHARSET", PGSQLCharset.UTF8),
78
+ default_factory = lambda: Env.get("DB_CHARSET", PGSQLCharset.UTF8.value),
79
79
  metadata = {
80
80
  "description": "Database charset",
81
81
  "default": PGSQLCharset.UTF8.value
@@ -115,6 +115,7 @@ class PGSQL(BaseEntity):
115
115
  )
116
116
 
117
117
  def __post_init__(self):
118
+ super().__post_init__()
118
119
  """
119
120
  Validates the initialization of the database entity attributes after object creation.
120
121
 
@@ -42,7 +42,7 @@ class SQLite(BaseEntity):
42
42
  )
43
43
 
44
44
  url: str = field(
45
- default = Env.get('DB_URL', 'sqlite:///' + Env.get('DB_DATABASE', 'database/database.sqlite')),
45
+ default_factory = lambda: Env.get('DB_URL', 'sqlite:///' + Env.get('DB_DATABASE', 'database/database.sqlite')),
46
46
  metadata = {
47
47
  "description": "The URL for connecting to the database.",
48
48
  "example": "sqlite:///database/database.sqlite",
@@ -50,7 +50,7 @@ class SQLite(BaseEntity):
50
50
  )
51
51
 
52
52
  database: str = field(
53
- default = Env.get('DB_DATABASE', 'database.sqlite'),
53
+ default_factory = lambda: Env.get('DB_DATABASE', 'database.sqlite'),
54
54
  metadata = {
55
55
  "description": "The path to the SQLite database file.",
56
56
  "example": "database.sqlite",
@@ -58,7 +58,7 @@ class SQLite(BaseEntity):
58
58
  )
59
59
 
60
60
  prefix: str = field(
61
- default = Env.get('DB_PREFIX', ''),
61
+ default_factory = lambda: Env.get('DB_PREFIX', ''),
62
62
  metadata = {
63
63
  "description": "Prefix for table names.",
64
64
  "example": "",
@@ -66,7 +66,7 @@ class SQLite(BaseEntity):
66
66
  )
67
67
 
68
68
  foreign_key_constraints: bool | SQLiteForeignKey = field(
69
- default = Env.get('DB_FOREIGN_KEYS', SQLiteForeignKey.OFF.value),
69
+ default_factory = lambda: Env.get('DB_FOREIGN_KEYS', SQLiteForeignKey.OFF.value),
70
70
  metadata = {
71
71
  "description": "Whether foreign key constraints are enabled.",
72
72
  "example": SQLiteForeignKey.OFF.value
@@ -74,7 +74,7 @@ class SQLite(BaseEntity):
74
74
  )
75
75
 
76
76
  busy_timeout: int = field(
77
- default = Env.get('DB_BUSY_TIMEOUT', 5000),
77
+ default_factory = lambda: Env.get('DB_BUSY_TIMEOUT', 5000),
78
78
  metadata = {
79
79
  "description": "The timeout period (in milliseconds) before retrying a locked database.",
80
80
  "example": 5000
@@ -82,7 +82,7 @@ class SQLite(BaseEntity):
82
82
  )
83
83
 
84
84
  journal_mode: str | SQLiteJournalMode = field(
85
- default = Env.get('DB_JOURNAL_MODE', SQLiteJournalMode.DELETE.value),
85
+ default_factory = lambda: Env.get('DB_JOURNAL_MODE', SQLiteJournalMode.DELETE.value),
86
86
  metadata = {
87
87
  "description": "The journal mode used for transactions.",
88
88
  "example": SQLiteJournalMode.DELETE.value
@@ -90,7 +90,7 @@ class SQLite(BaseEntity):
90
90
  )
91
91
 
92
92
  synchronous: str | SQLiteSynchronous = field(
93
- default = Env.get('DB_SYNCHRONOUS', SQLiteSynchronous.NORMAL.value),
93
+ default_factory = lambda: Env.get('DB_SYNCHRONOUS', SQLiteSynchronous.NORMAL.value),
94
94
  metadata = {
95
95
  "description": "The synchronization level for the database.",
96
96
  "example": SQLiteSynchronous.NORMAL.value
@@ -98,6 +98,7 @@ class SQLite(BaseEntity):
98
98
  )
99
99
 
100
100
  def __post_init__(self):
101
+ super().__post_init__()
101
102
  """
102
103
  Post-initialization validation for SQLite database configuration fields.
103
104
 
@@ -93,6 +93,7 @@ class S3(BaseEntity):
93
93
  )
94
94
 
95
95
  def __post_init__(self):
96
+ super().__post_init__()
96
97
  """
97
98
  Validates the initialization of the AWS filesystem entity attributes.
98
99
 
@@ -23,7 +23,7 @@ class Disks(BaseEntity):
23
23
  default_factory = lambda: Local(),
24
24
  metadata={
25
25
  "description": "The absolute or relative path where local files are stored.",
26
- "default": Local().toDict()
26
+ "default": lambda: Local().toDict()
27
27
  }
28
28
  )
29
29
 
@@ -31,7 +31,7 @@ class Disks(BaseEntity):
31
31
  default_factory = lambda: Public(),
32
32
  metadata={
33
33
  "description": "The absolute or relative path where public files are stored.",
34
- "default": Public().toDict()
34
+ "default": lambda: Public().toDict()
35
35
  }
36
36
  )
37
37
 
@@ -39,11 +39,12 @@ class Disks(BaseEntity):
39
39
  default_factory = lambda: S3(),
40
40
  metadata={
41
41
  "description": "The configuration for AWS S3 storage.",
42
- "default": S3().toDict()
42
+ "default": lambda: S3().toDict()
43
43
  }
44
44
  )
45
45
 
46
46
  def __post_init__(self):
47
+ super().__post_init__()
47
48
  """
48
49
  Post-initialization method to ensure the 'path' attribute is a non-empty Path object.
49
50
  - Converts 'path' to a Path instance if it is not already.
@@ -28,11 +28,12 @@ class Filesystems(BaseEntity):
28
28
  default_factory = lambda: Disks(),
29
29
  metadata={
30
30
  "description": "A collection of available filesystem disks.",
31
- "default": Disks().toDict()
31
+ "default": lambda: Disks().toDict()
32
32
  }
33
33
  )
34
34
 
35
35
  def __post_init__(self):
36
+ super().__post_init__()
36
37
  """
37
38
  Validates the types of the attributes after initialization.
38
39
  """
@@ -21,6 +21,7 @@ class Local(BaseEntity):
21
21
  )
22
22
 
23
23
  def __post_init__(self):
24
+ super().__post_init__()
24
25
  """
25
26
  Post-initialization method to ensure the 'path' attribute is a non-empty string.
26
27
 
@@ -29,6 +29,7 @@ class Public(BaseEntity):
29
29
  )
30
30
 
31
31
  def __post_init__(self):
32
+ super().__post_init__()
32
33
  """
33
34
  Post-initialization method to ensure the 'path' attribute is a non-empty string.
34
35
 
@@ -18,7 +18,7 @@ class Channels(BaseEntity):
18
18
  default_factory = lambda: Stack(),
19
19
  metadata = {
20
20
  "description": "Configuration for stack log channel.",
21
- "default": Stack().toDict()
21
+ "default": lambda: Stack().toDict()
22
22
  }
23
23
  )
24
24
 
@@ -26,7 +26,7 @@ class Channels(BaseEntity):
26
26
  default_factory = lambda: Hourly(),
27
27
  metadata = {
28
28
  "description": "Configuration for hourly log rotation.",
29
- "default": Hourly().toDict()
29
+ "default": lambda: Hourly().toDict()
30
30
  }
31
31
  )
32
32
 
@@ -34,7 +34,7 @@ class Channels(BaseEntity):
34
34
  default_factory = lambda: Daily(),
35
35
  metadata = {
36
36
  "description": "Configuration for daily log rotation.",
37
- "default": Daily().toDict()
37
+ "default": lambda: Daily().toDict()
38
38
  }
39
39
  )
40
40
 
@@ -42,7 +42,7 @@ class Channels(BaseEntity):
42
42
  default_factory = lambda: Weekly(),
43
43
  metadata = {
44
44
  "description": "Configuration for weekly log rotation.",
45
- "default": Weekly().toDict()
45
+ "default": lambda: Weekly().toDict()
46
46
  }
47
47
  )
48
48
 
@@ -50,7 +50,7 @@ class Channels(BaseEntity):
50
50
  default_factory = lambda: Monthly(),
51
51
  metadata = {
52
52
  "description": "Configuration for monthly log rotation.",
53
- "default": Monthly().toDict()
53
+ "default": lambda: Monthly().toDict()
54
54
  }
55
55
  )
56
56
 
@@ -58,11 +58,12 @@ class Channels(BaseEntity):
58
58
  default_factory = lambda: Chunked(),
59
59
  metadata = {
60
60
  "description": "Configuration for chunked log file storage.",
61
- "default": Chunked().toDict()
61
+ "default": lambda: Chunked().toDict()
62
62
  }
63
63
  )
64
64
 
65
65
  def __post_init__(self):
66
+ super().__post_init__()
66
67
  """
67
68
  Post-initialization method to validate the types of log rotation properties.
68
69
  Ensures that the following instance attributes are of the correct types:
@@ -58,6 +58,7 @@ class Chunked(BaseEntity):
58
58
  )
59
59
 
60
60
  def __post_init__(self):
61
+ super().__post_init__()
61
62
  """
62
63
  Performs validation and normalization of configuration fields.
63
64