orionis 0.310.0__py3-none-any.whl → 0.312.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 (115) hide show
  1. orionis/container/container.py +5 -3
  2. orionis/container/exceptions/type_error_exception.py +13 -11
  3. orionis/foundation/config/app/entities/app.py +24 -2
  4. orionis/foundation/config/auth/entities/auth.py +24 -2
  5. orionis/foundation/config/cache/entities/cache.py +25 -3
  6. orionis/foundation/config/cache/entities/file.py +25 -3
  7. orionis/foundation/config/cache/entities/stores.py +25 -3
  8. orionis/foundation/config/cors/entities/cors.py +24 -2
  9. orionis/foundation/config/database/entities/connections.py +25 -3
  10. orionis/foundation/config/database/entities/database.py +24 -2
  11. orionis/foundation/config/database/entities/mysql.py +25 -3
  12. orionis/foundation/config/database/entities/oracle.py +25 -3
  13. orionis/foundation/config/database/entities/pgsql.py +25 -3
  14. orionis/foundation/config/database/entities/sqlite.py +25 -3
  15. orionis/foundation/config/filesystems/entitites/aws.py +24 -2
  16. orionis/foundation/config/filesystems/entitites/disks.py +24 -2
  17. orionis/foundation/config/filesystems/entitites/filesystems.py +23 -1
  18. orionis/foundation/config/filesystems/entitites/local.py +24 -2
  19. orionis/foundation/config/filesystems/entitites/public.py +24 -2
  20. orionis/foundation/config/logging/entities/channels.py +25 -3
  21. orionis/foundation/config/logging/entities/chunked.py +25 -3
  22. orionis/foundation/config/logging/entities/daily.py +25 -3
  23. orionis/foundation/config/logging/entities/hourly.py +25 -3
  24. orionis/foundation/config/logging/entities/logging.py +23 -1
  25. orionis/foundation/config/logging/entities/monthly.py +25 -3
  26. orionis/foundation/config/logging/entities/stack.py +25 -3
  27. orionis/foundation/config/logging/entities/weekly.py +25 -3
  28. orionis/foundation/config/mail/entities/file.py +24 -2
  29. orionis/foundation/config/mail/entities/mail.py +23 -1
  30. orionis/foundation/config/mail/entities/mailers.py +24 -2
  31. orionis/foundation/config/mail/entities/smtp.py +24 -2
  32. orionis/foundation/config/queue/entities/brokers.py +24 -2
  33. orionis/foundation/config/queue/entities/database.py +25 -3
  34. orionis/foundation/config/queue/entities/queue.py +24 -2
  35. orionis/foundation/config/roots/paths.py +24 -2
  36. orionis/foundation/config/session/entities/session.py +23 -2
  37. orionis/foundation/config/startup.py +25 -3
  38. orionis/foundation/config/testing/entities/testing.py +1 -1
  39. orionis/foundation/exceptions/integrity.py +19 -0
  40. orionis/metadata/framework.py +1 -1
  41. orionis/services/asynchrony/exceptions/coroutine_exception.py +3 -3
  42. orionis/services/environment/exceptions/environment_value_error.py +9 -8
  43. orionis/services/environment/exceptions/environment_value_exception.py +3 -7
  44. orionis/services/introspection/abstract/reflection_abstract.py +7 -3
  45. orionis/services/introspection/concretes/reflection_concrete.py +1 -1
  46. orionis/services/introspection/dependencies/reflect_dependencies.py +1 -1
  47. orionis/services/introspection/exceptions/reflection_attribute_error.py +4 -10
  48. orionis/services/introspection/exceptions/reflection_type_error.py +3 -10
  49. orionis/services/introspection/exceptions/reflection_value_error.py +3 -10
  50. orionis/services/introspection/instances/reflection_instance.py +1 -1
  51. orionis/services/introspection/modules/reflection_module.py +1 -1
  52. orionis/services/paths/exceptions/not_found_exceptions.py +3 -15
  53. orionis/services/paths/exceptions/path_value_exceptions.py +3 -15
  54. orionis/services/system/workers.py +17 -0
  55. orionis/support/standard/exceptions/std_value_exception.py +3 -7
  56. orionis/test/exceptions/test_config_exception.py +2 -2
  57. orionis/test/exceptions/test_failure_exception.py +2 -4
  58. orionis/test/exceptions/test_persistence_error.py +2 -7
  59. orionis/test/exceptions/test_runtime_error.py +3 -3
  60. orionis/test/exceptions/test_value_error.py +3 -3
  61. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/METADATA +1 -1
  62. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/RECORD +110 -114
  63. tests/foundation/config/app/test_foundation_config_app.py +1 -1
  64. tests/foundation/config/cache/test_foundation_config_cache.py +1 -1
  65. tests/foundation/config/cache/test_foundation_config_cache_file.py +1 -1
  66. tests/foundation/config/cache/test_foundation_config_cache_stores.py +1 -1
  67. tests/foundation/config/cors/test_foundation_config_cors.py +1 -1
  68. tests/foundation/config/database/test_foundation_config_database.py +1 -1
  69. tests/foundation/config/database/test_foundation_config_database_connections.py +1 -1
  70. tests/foundation/config/database/test_foundation_config_database_mysql.py +1 -1
  71. tests/foundation/config/database/test_foundation_config_database_oracle.py +1 -1
  72. tests/foundation/config/database/test_foundation_config_database_pgsql.py +1 -1
  73. tests/foundation/config/database/test_foundation_config_database_sqlite.py +1 -1
  74. tests/foundation/config/filesystems/test_foundation_config_filesystems.py +1 -1
  75. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +1 -1
  76. tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +1 -1
  77. tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +1 -1
  78. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +1 -1
  79. tests/foundation/config/logging/test_foundation_config_logging.py +1 -1
  80. tests/foundation/config/logging/test_foundation_config_logging_channels.py +1 -1
  81. tests/foundation/config/logging/test_foundation_config_logging_chunked.py +1 -1
  82. tests/foundation/config/logging/test_foundation_config_logging_daily.py +1 -1
  83. tests/foundation/config/logging/test_foundation_config_logging_hourly.py +1 -1
  84. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +1 -1
  85. tests/foundation/config/logging/test_foundation_config_logging_stack.py +1 -1
  86. tests/foundation/config/logging/test_foundation_config_logging_weekly.py +1 -1
  87. tests/foundation/config/mail/test_foundation_config_mail.py +1 -1
  88. tests/foundation/config/mail/test_foundation_config_mail_file.py +1 -1
  89. tests/foundation/config/mail/test_foundation_config_mail_mailers.py +1 -1
  90. tests/foundation/config/mail/test_foundation_config_mail_smtp.py +1 -1
  91. tests/foundation/config/queue/test_foundation_config_queue.py +1 -1
  92. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +1 -1
  93. tests/foundation/config/queue/test_foundation_config_queue_database.py +1 -1
  94. tests/foundation/config/root/test_foundation_config_root_paths.py +1 -1
  95. tests/foundation/config/session/test_foundation_config_session.py +1 -1
  96. tests/foundation/config/startup/test_foundation_config_startup.py +1 -1
  97. tests/foundation/config/testing/test_foundation_config_testing.py +1 -1
  98. tests/foundation/{config/exceptions → exceptions}/test_foundation_config_exceptions.py +7 -7
  99. orionis/foundation/config/exceptions/integrity.py +0 -30
  100. orionis/services/introspection/dependencies/contracts/__init__.py +0 -0
  101. orionis/services/introspection/instances/contracts/__init__.py +0 -0
  102. orionis/services/introspection/modules/contracts/__init__.py +0 -0
  103. tests/foundation/config/exceptions/__init__.py +0 -0
  104. /orionis/foundation/{config/exceptions → exceptions}/__init__.py +0 -0
  105. /orionis/services/introspection/{abstract/contracts → contracts}/__init__.py +0 -0
  106. /orionis/services/introspection/{dependencies/contracts → contracts}/reflect_dependencies.py +0 -0
  107. /orionis/services/introspection/{abstract/contracts → contracts}/reflection_abstract.py +0 -0
  108. /orionis/services/introspection/{concretes/contracts → contracts}/reflection_concrete.py +0 -0
  109. /orionis/services/introspection/{instances/contracts → contracts}/reflection_instance.py +0 -0
  110. /orionis/services/introspection/{modules/contracts → contracts}/reflection_module.py +0 -0
  111. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/WHEEL +0 -0
  112. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/licenses/LICENCE +0 -0
  113. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/top_level.txt +0 -0
  114. {orionis-0.310.0.dist-info → orionis-0.312.0.dist-info}/zip-safe +0 -0
  115. {orionis/services/introspection/concretes/contracts → tests/foundation/exceptions}/__init__.py +0 -0
@@ -1,5 +1,6 @@
1
1
  from typing import Any, Callable
2
2
  from orionis.container.enums.lifetimes import Lifetime
3
+ from orionis.container.exceptions.type_error_exception import OrionisContainerTypeError
3
4
  from orionis.services.introspection.abstract.reflection_abstract import ReflectionAbstract
4
5
 
5
6
 
@@ -17,6 +18,7 @@ class Container:
17
18
  The concrete implementation to associate with the abstract type.
18
19
  """
19
20
 
20
- ReflectionAbstract.ensureIsAbstractClass(abstract)
21
-
22
- # self.bind(abstract, concrete, Lifetime.TRANSIENT)
21
+ try:
22
+ ReflectionAbstract.ensureIsAbstractClass(abstract)
23
+ except Exception as e:
24
+ raise OrionisContainerTypeError(f"Type error while registering service: {e}")
@@ -1,17 +1,19 @@
1
1
  class OrionisContainerTypeError(TypeError):
2
- """
3
- Custom exception for TypeError related to the Orionis container.
4
- """
5
2
 
6
- def __init__(self, message: str) -> None:
3
+ def __init__(self, msg: str):
7
4
  """
8
- Initializes the exception with an error message.
9
-
10
- Args:
11
- message (str): Descriptive error message.
5
+ Parameters
6
+ ----------
7
+ msg : str
8
+ Descriptive error message explaining the cause of the exception.
12
9
  """
13
- super().__init__(message)
10
+ super().__init__(msg)
14
11
 
15
12
  def __str__(self) -> str:
16
- """Returns a string representation of the exception."""
17
- return f"[OrionisContainerTypeError] {self.args[0]}"
13
+ """
14
+ Returns
15
+ -------
16
+ str
17
+ Formatted string describing the exception, including the exception name and error message.
18
+ """
19
+ return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,7 +1,7 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.app.enums.ciphers import Cipher
3
3
  from orionis.foundation.config.app.enums.environments import Environments
4
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
4
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
5
5
  from orionis.services.environment.env import Env
6
6
  from orionis.services.system.workers import Workers
7
7
 
@@ -204,3 +204,25 @@ class App:
204
204
  dict: A dictionary representation of the Dataclass object.
205
205
  """
206
206
  return asdict(self)
207
+
208
+ def getFields(self):
209
+ """
210
+ Retrieves a list of field information for the current dataclass instance.
211
+
212
+ Returns:
213
+ list: A list of dictionaries, each containing details about a field:
214
+ - name (str): The name of the field.
215
+ - type (type): The type of the field.
216
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
217
+ - metadata (mapping): The metadata associated with the field.
218
+ """
219
+ __fields = []
220
+ for field in fields(self):
221
+ __metadata = dict(field.metadata) or {}
222
+ __fields.append({
223
+ "name": field.name,
224
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
225
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
226
+ "metadata": __metadata
227
+ })
228
+ return __fields
@@ -1,4 +1,4 @@
1
- from dataclasses import asdict, dataclass
1
+ from dataclasses import asdict, dataclass, fields
2
2
 
3
3
  @dataclass(unsafe_hash=True, kw_only=True)
4
4
  class Auth:
@@ -16,4 +16,26 @@ class Auth:
16
16
  Returns:
17
17
  dict: A dictionary representation of the Dataclass object.
18
18
  """
19
- return asdict(self)
19
+ return asdict(self)
20
+
21
+ def getFields(self):
22
+ """
23
+ Retrieves a list of field information for the current dataclass instance.
24
+
25
+ Returns:
26
+ list: A list of dictionaries, each containing details about a field:
27
+ - name (str): The name of the field.
28
+ - type (type): The type of the field.
29
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
30
+ - metadata (mapping): The metadata associated with the field.
31
+ """
32
+ __fields = []
33
+ for field in fields(self):
34
+ __metadata = dict(field.metadata) or {}
35
+ __fields.append({
36
+ "name": field.name,
37
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
38
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
39
+ "metadata": __metadata
40
+ })
41
+ return __fields
@@ -1,7 +1,7 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.cache.entities.stores import Stores
3
3
  from orionis.foundation.config.cache.enums.drivers import Drivers
4
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
4
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
5
5
  from orionis.services.environment.env import Env
6
6
 
7
7
  @dataclass(unsafe_hash=True, kw_only=True)
@@ -71,4 +71,26 @@ class Cache:
71
71
  Returns:
72
72
  dict: A dictionary representation of the Dataclass object.
73
73
  """
74
- return asdict(self)
74
+ return asdict(self)
75
+
76
+ def getFields(self):
77
+ """
78
+ Retrieves a list of field information for the current dataclass instance.
79
+
80
+ Returns:
81
+ list: A list of dictionaries, each containing details about a field:
82
+ - name (str): The name of the field.
83
+ - type (type): The type of the field.
84
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
85
+ - metadata (mapping): The metadata associated with the field.
86
+ """
87
+ __fields = []
88
+ for field in fields(self):
89
+ __metadata = dict(field.metadata) or {}
90
+ __fields.append({
91
+ "name": field.name,
92
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
93
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
94
+ "metadata": __metadata
95
+ })
96
+ return __fields
@@ -1,5 +1,5 @@
1
- from dataclasses import asdict, dataclass, field
2
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
1
+ from dataclasses import asdict, dataclass, field, fields
2
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
3
3
 
4
4
  @dataclass(unsafe_hash=True, kw_only=True)
5
5
  class File:
@@ -43,4 +43,26 @@ class File:
43
43
  Returns:
44
44
  dict: A dictionary representation of the Dataclass object.
45
45
  """
46
- return asdict(self)
46
+ return asdict(self)
47
+
48
+ def getFields(self):
49
+ """
50
+ Retrieves a list of field information for the current dataclass instance.
51
+
52
+ Returns:
53
+ list: A list of dictionaries, each containing details about a field:
54
+ - name (str): The name of the field.
55
+ - type (type): The type of the field.
56
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
57
+ - metadata (mapping): The metadata associated with the field.
58
+ """
59
+ __fields = []
60
+ for field in fields(self):
61
+ __metadata = dict(field.metadata) or {}
62
+ __fields.append({
63
+ "name": field.name,
64
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
65
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
66
+ "metadata": __metadata
67
+ })
68
+ return __fields
@@ -1,6 +1,6 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.cache.entities.file import File
3
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
3
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
4
4
 
5
5
  @dataclass(unsafe_hash=True, kw_only=True)
6
6
  class Stores:
@@ -43,4 +43,26 @@ class Stores:
43
43
  Returns:
44
44
  dict: A dictionary representation of the Dataclass object.
45
45
  """
46
- return asdict(self)
46
+ return asdict(self)
47
+
48
+ def getFields(self):
49
+ """
50
+ Retrieves a list of field information for the current dataclass instance.
51
+
52
+ Returns:
53
+ list: A list of dictionaries, each containing details about a field:
54
+ - name (str): The name of the field.
55
+ - type (type): The type of the field.
56
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
57
+ - metadata (mapping): The metadata associated with the field.
58
+ """
59
+ __fields = []
60
+ for field in fields(self):
61
+ __metadata = dict(field.metadata) or {}
62
+ __fields.append({
63
+ "name": field.name,
64
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
65
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
66
+ "metadata": __metadata
67
+ })
68
+ return __fields
@@ -1,6 +1,6 @@
1
- from dataclasses import dataclass, field, asdict
1
+ from dataclasses import dataclass, field, asdict, fields
2
2
  from typing import List, Optional
3
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
3
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
4
4
 
5
5
  @dataclass(unsafe_hash=True, kw_only=True)
6
6
  class Cors:
@@ -127,3 +127,25 @@ class Cors:
127
127
  dict: A dictionary representation of the Dataclass object.
128
128
  """
129
129
  return asdict(self)
130
+
131
+ def getFields(self):
132
+ """
133
+ Retrieves a list of field information for the current dataclass instance.
134
+
135
+ Returns:
136
+ list: A list of dictionaries, each containing details about a field:
137
+ - name (str): The name of the field.
138
+ - type (type): The type of the field.
139
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
140
+ - metadata (mapping): The metadata associated with the field.
141
+ """
142
+ __fields = []
143
+ for field in fields(self):
144
+ __metadata = dict(field.metadata) or {}
145
+ __fields.append({
146
+ "name": field.name,
147
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
148
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
149
+ "metadata": __metadata
150
+ })
151
+ return __fields
@@ -1,9 +1,9 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.database.entities.mysql import MySQL
3
3
  from orionis.foundation.config.database.entities.oracle import Oracle
4
4
  from orionis.foundation.config.database.entities.pgsql import PGSQL
5
5
  from orionis.foundation.config.database.entities.sqlite import SQLite
6
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
6
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
7
7
 
8
8
  @dataclass(unsafe_hash=True, kw_only=True)
9
9
  class Connections:
@@ -86,4 +86,26 @@ class Connections:
86
86
  Returns:
87
87
  dict: A dictionary representation of the Dataclass object.
88
88
  """
89
- return asdict(self)
89
+ return asdict(self)
90
+
91
+ def getFields(self):
92
+ """
93
+ Retrieves a list of field information for the current dataclass instance.
94
+
95
+ Returns:
96
+ list: A list of dictionaries, each containing details about a field:
97
+ - name (str): The name of the field.
98
+ - type (type): The type of the field.
99
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
100
+ - metadata (mapping): The metadata associated with the field.
101
+ """
102
+ __fields = []
103
+ for field in fields(self):
104
+ __metadata = dict(field.metadata) or {}
105
+ __fields.append({
106
+ "name": field.name,
107
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
108
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
109
+ "metadata": __metadata
110
+ })
111
+ return __fields
@@ -1,7 +1,7 @@
1
1
  from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.database.entities.connections import Connections
3
3
  from orionis.services.environment.env import Env
4
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
4
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
5
5
 
6
6
  @dataclass(unsafe_hash=True, kw_only=True)
7
7
  class Database:
@@ -59,4 +59,26 @@ class Database:
59
59
  Returns:
60
60
  dict: A dictionary representation of the Dataclass object.
61
61
  """
62
- return asdict(self)
62
+ return asdict(self)
63
+
64
+ def getFields(self):
65
+ """
66
+ Retrieves a list of field information for the current dataclass instance.
67
+
68
+ Returns:
69
+ list: A list of dictionaries, each containing details about a field:
70
+ - name (str): The name of the field.
71
+ - type (type): The type of the field.
72
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
73
+ - metadata (mapping): The metadata associated with the field.
74
+ """
75
+ __fields = []
76
+ for field in fields(self):
77
+ __metadata = dict(field.metadata) or {}
78
+ __fields.append({
79
+ "name": field.name,
80
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
81
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
82
+ "metadata": __metadata
83
+ })
84
+ return __fields
@@ -1,9 +1,9 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from typing import Optional
3
3
  from orionis.foundation.config.database.enums.mysql_charsets import MySQLCharset
4
4
  from orionis.foundation.config.database.enums.mysql_collations import MySQLCollation
5
5
  from orionis.foundation.config.database.enums.mysql_engine import MySQLEngine
6
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
6
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
7
7
  from orionis.services.environment.env import Env
8
8
 
9
9
  @dataclass(unsafe_hash=True, kw_only=True)
@@ -267,4 +267,26 @@ class MySQL:
267
267
  Returns:
268
268
  dict: A dictionary representation of the Dataclass object.
269
269
  """
270
- return asdict(self)
270
+ return asdict(self)
271
+
272
+ def getFields(self):
273
+ """
274
+ Retrieves a list of field information for the current dataclass instance.
275
+
276
+ Returns:
277
+ list: A list of dictionaries, each containing details about a field:
278
+ - name (str): The name of the field.
279
+ - type (type): The type of the field.
280
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
281
+ - metadata (mapping): The metadata associated with the field.
282
+ """
283
+ __fields = []
284
+ for field in fields(self):
285
+ __metadata = dict(field.metadata) or {}
286
+ __fields.append({
287
+ "name": field.name,
288
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
289
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
290
+ "metadata": __metadata
291
+ })
292
+ return __fields
@@ -1,8 +1,8 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from typing import Optional
3
3
  from orionis.foundation.config.database.enums.oracle_encoding import OracleEncoding
4
4
  from orionis.foundation.config.database.enums.oracle_nencoding import OracleNencoding
5
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
5
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
6
6
  from orionis.services.environment.env import Env
7
7
 
8
8
  @dataclass(unsafe_hash=True, kw_only=True)
@@ -224,4 +224,26 @@ class Oracle:
224
224
  Returns:
225
225
  dict: A dictionary representation of the Dataclass object.
226
226
  """
227
- return asdict(self)
227
+ return asdict(self)
228
+
229
+ def getFields(self):
230
+ """
231
+ Retrieves a list of field information for the current dataclass instance.
232
+
233
+ Returns:
234
+ list: A list of dictionaries, each containing details about a field:
235
+ - name (str): The name of the field.
236
+ - type (type): The type of the field.
237
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
238
+ - metadata (mapping): The metadata associated with the field.
239
+ """
240
+ __fields = []
241
+ for field in fields(self):
242
+ __metadata = dict(field.metadata) or {}
243
+ __fields.append({
244
+ "name": field.name,
245
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
246
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
247
+ "metadata": __metadata
248
+ })
249
+ return __fields
@@ -1,7 +1,7 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.database.enums.pgsql_charsets import PGSQLCharset
3
3
  from orionis.foundation.config.database.enums.pgsql_mode import PGSQLSSLMode
4
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
4
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
5
5
  from orionis.services.environment.env import Env
6
6
 
7
7
  @dataclass(unsafe_hash=True, kw_only=True)
@@ -186,4 +186,26 @@ class PGSQL:
186
186
  Returns:
187
187
  dict: A dictionary representation of the Dataclass object.
188
188
  """
189
- return asdict(self)
189
+ return asdict(self)
190
+
191
+ def getFields(self):
192
+ """
193
+ Retrieves a list of field information for the current dataclass instance.
194
+
195
+ Returns:
196
+ list: A list of dictionaries, each containing details about a field:
197
+ - name (str): The name of the field.
198
+ - type (type): The type of the field.
199
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
200
+ - metadata (mapping): The metadata associated with the field.
201
+ """
202
+ __fields = []
203
+ for field in fields(self):
204
+ __metadata = dict(field.metadata) or {}
205
+ __fields.append({
206
+ "name": field.name,
207
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
208
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
209
+ "metadata": __metadata
210
+ })
211
+ return __fields
@@ -1,8 +1,8 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from orionis.foundation.config.database.enums.sqlite_foreign_key import SQLiteForeignKey
3
3
  from orionis.foundation.config.database.enums.sqlite_journal import SQLiteJournalMode
4
4
  from orionis.foundation.config.database.enums.sqlite_synchronous import SQLiteSynchronous
5
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
5
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
6
6
  from orionis.services.environment.env import Env
7
7
 
8
8
  @dataclass(unsafe_hash=True, kw_only=True)
@@ -175,4 +175,26 @@ class SQLite:
175
175
  Returns:
176
176
  dict: A dictionary representation of the Dataclass object.
177
177
  """
178
- return asdict(self)
178
+ return asdict(self)
179
+
180
+ def getFields(self):
181
+ """
182
+ Retrieves a list of field information for the current dataclass instance.
183
+
184
+ Returns:
185
+ list: A list of dictionaries, each containing details about a field:
186
+ - name (str): The name of the field.
187
+ - type (type): The type of the field.
188
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
189
+ - metadata (mapping): The metadata associated with the field.
190
+ """
191
+ __fields = []
192
+ for field in fields(self):
193
+ __metadata = dict(field.metadata) or {}
194
+ __fields.append({
195
+ "name": field.name,
196
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
197
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
198
+ "metadata": __metadata
199
+ })
200
+ return __fields
@@ -1,6 +1,6 @@
1
- from dataclasses import asdict, dataclass, field
1
+ from dataclasses import asdict, dataclass, field, fields
2
2
  from typing import Optional
3
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
3
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
4
4
 
5
5
  @dataclass(unsafe_hash=True, kw_only=True)
6
6
  class S3:
@@ -132,3 +132,25 @@ class S3:
132
132
  dict: A dictionary representation of the Dataclass object.
133
133
  """
134
134
  return asdict(self)
135
+
136
+ def getFields(self):
137
+ """
138
+ Retrieves a list of field information for the current dataclass instance.
139
+
140
+ Returns:
141
+ list: A list of dictionaries, each containing details about a field:
142
+ - name (str): The name of the field.
143
+ - type (type): The type of the field.
144
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
145
+ - metadata (mapping): The metadata associated with the field.
146
+ """
147
+ __fields = []
148
+ for field in fields(self):
149
+ __metadata = dict(field.metadata) or {}
150
+ __fields.append({
151
+ "name": field.name,
152
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
153
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
154
+ "metadata": __metadata
155
+ })
156
+ return __fields
@@ -1,5 +1,5 @@
1
- from dataclasses import asdict, dataclass, field
2
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
1
+ from dataclasses import asdict, dataclass, field, fields
2
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
3
3
  from orionis.foundation.config.filesystems.entitites.aws import S3
4
4
  from orionis.foundation.config.filesystems.entitites.public import Public
5
5
  from orionis.foundation.config.filesystems.entitites.local import Local
@@ -66,3 +66,25 @@ class Disks:
66
66
  dict: A dictionary representation of the Dataclass object.
67
67
  """
68
68
  return asdict(self)
69
+
70
+ def getFields(self):
71
+ """
72
+ Retrieves a list of field information for the current dataclass instance.
73
+
74
+ Returns:
75
+ list: A list of dictionaries, each containing details about a field:
76
+ - name (str): The name of the field.
77
+ - type (type): The type of the field.
78
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
79
+ - metadata (mapping): The metadata associated with the field.
80
+ """
81
+ __fields = []
82
+ for field in fields(self):
83
+ __metadata = dict(field.metadata) or {}
84
+ __fields.append({
85
+ "name": field.name,
86
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
87
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
88
+ "metadata": __metadata
89
+ })
90
+ return __fields
@@ -1,6 +1,6 @@
1
1
  from dataclasses import dataclass, field, asdict, fields
2
2
  from orionis.foundation.config.filesystems.entitites.disks import Disks
3
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
3
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
4
4
 
5
5
  @dataclass(unsafe_hash=True, kw_only=True)
6
6
  class Filesystems:
@@ -51,3 +51,25 @@ class Filesystems:
51
51
  Converts the current instance into a dictionary representation.
52
52
  """
53
53
  return asdict(self)
54
+
55
+ def getFields(self):
56
+ """
57
+ Retrieves a list of field information for the current dataclass instance.
58
+
59
+ Returns:
60
+ list: A list of dictionaries, each containing details about a field:
61
+ - name (str): The name of the field.
62
+ - type (type): The type of the field.
63
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
64
+ - metadata (mapping): The metadata associated with the field.
65
+ """
66
+ __fields = []
67
+ for field in fields(self):
68
+ __metadata = dict(field.metadata) or {}
69
+ __fields.append({
70
+ "name": field.name,
71
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
72
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
73
+ "metadata": __metadata
74
+ })
75
+ return __fields
@@ -1,5 +1,5 @@
1
- from dataclasses import asdict, dataclass, field
2
- from orionis.foundation.config.exceptions.integrity import OrionisIntegrityException
1
+ from dataclasses import asdict, dataclass, field, fields
2
+ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
3
3
 
4
4
  @dataclass(unsafe_hash=True, kw_only=True)
5
5
  class Local:
@@ -37,3 +37,25 @@ class Local:
37
37
  dict: A dictionary representation of the Dataclass object.
38
38
  """
39
39
  return asdict(self)
40
+
41
+ def getFields(self):
42
+ """
43
+ Retrieves a list of field information for the current dataclass instance.
44
+
45
+ Returns:
46
+ list: A list of dictionaries, each containing details about a field:
47
+ - name (str): The name of the field.
48
+ - type (type): The type of the field.
49
+ - default: The default value of the field, if specified; otherwise, the value from metadata or None.
50
+ - metadata (mapping): The metadata associated with the field.
51
+ """
52
+ __fields = []
53
+ for field in fields(self):
54
+ __metadata = dict(field.metadata) or {}
55
+ __fields.append({
56
+ "name": field.name,
57
+ "type": field.type.__name__ if hasattr(field.type, '__name__') else str(field.type),
58
+ "default": field.default if (field.default is not None and '_MISSING_TYPE' not in str(field.default)) else __metadata.get('default', None),
59
+ "metadata": __metadata
60
+ })
61
+ return __fields