orionis 0.436.0__py3-none-any.whl → 0.437.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/console/contracts/kernel.py +16 -3
- orionis/console/dumper/contracts/dump.py +8 -9
- orionis/console/dynamic/progress_bar.py +21 -29
- orionis/console/output/console.py +12 -0
- orionis/container/context/manager.py +27 -17
- orionis/container/context/scope.py +8 -7
- orionis/container/contracts/service_provider.py +12 -8
- orionis/container/providers/service_provider.py +9 -16
- orionis/container/resolver/resolver.py +29 -22
- orionis/foundation/contracts/application.py +437 -47
- orionis/foundation/contracts/config.py +14 -6
- orionis/foundation/providers/console_provider.py +16 -15
- orionis/foundation/providers/dumper_provider.py +20 -8
- orionis/foundation/providers/logger_provider.py +19 -14
- orionis/foundation/providers/path_resolver_provider.py +17 -14
- orionis/foundation/providers/progress_bar_provider.py +15 -14
- orionis/foundation/providers/testing_provider.py +20 -14
- orionis/foundation/providers/workers_provider.py +19 -14
- orionis/metadata/framework.py +1 -1
- orionis/services/asynchrony/contracts/coroutines.py +1 -0
- orionis/services/asynchrony/coroutines.py +2 -0
- orionis/services/asynchrony/exceptions/exception.py +2 -0
- orionis/services/environment/core/dot_env.py +9 -0
- orionis/services/environment/dynamic/caster.py +31 -2
- orionis/services/environment/key/key_generator.py +1 -0
- orionis/services/environment/validators/key_name.py +1 -0
- orionis/services/environment/validators/types.py +5 -1
- orionis/services/introspection/abstract/contracts/reflection.py +188 -221
- orionis/services/introspection/abstract/reflection.py +311 -178
- orionis/services/introspection/callables/contracts/reflection.py +64 -21
- orionis/services/introspection/callables/reflection.py +98 -23
- orionis/services/introspection/concretes/reflection.py +278 -181
- orionis/services/introspection/dependencies/contracts/reflection.py +21 -18
- orionis/services/introspection/dependencies/entities/callable_dependencies.py +15 -16
- orionis/services/introspection/dependencies/entities/class_dependencies.py +24 -16
- orionis/services/introspection/dependencies/entities/known_dependencies.py +19 -13
- orionis/services/introspection/dependencies/entities/method_dependencies.py +22 -16
- orionis/services/introspection/dependencies/reflection.py +0 -3
- orionis/services/introspection/instances/reflection.py +16 -6
- orionis/services/log/contracts/log_service.py +4 -0
- orionis/services/log/handlers/filename.py +2 -0
- orionis/services/paths/contracts/resolver.py +0 -3
- orionis/services/paths/resolver.py +0 -3
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/METADATA +1 -1
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/RECORD +50 -50
- /orionis/services/introspection/concretes/contracts/{concrete.py → reflection.py} +0 -0
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/WHEEL +0 -0
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/top_level.txt +0 -0
- {orionis-0.436.0.dist-info → orionis-0.437.0.dist-info}/zip-safe +0 -0
|
@@ -20,6 +20,7 @@ class SecureKeyGenerator:
|
|
|
20
20
|
A 64-character hexadecimal string representing a 32-byte
|
|
21
21
|
cryptographically secure random key.
|
|
22
22
|
"""
|
|
23
|
+
|
|
23
24
|
# Generate 32 random bytes using a cryptographically secure RNG
|
|
24
25
|
# Encode the bytes as a hexadecimal string and return
|
|
25
26
|
return os.urandom(32).hex()
|
|
@@ -39,18 +39,22 @@ class __ValidateTypes:
|
|
|
39
39
|
|
|
40
40
|
# If type_hint is provided, convert it to a string if it's an EnvironmentValueType.
|
|
41
41
|
if type_hint:
|
|
42
|
+
|
|
42
43
|
# If type_hint is a string, convert it to EnvironmentValueType if valid.
|
|
43
44
|
try:
|
|
44
45
|
if isinstance(type_hint, str):
|
|
45
46
|
type_hint = EnvironmentValueType[type_hint.upper()].value
|
|
46
47
|
elif isinstance(type_hint, EnvironmentValueType):
|
|
47
48
|
type_hint = type_hint.value
|
|
49
|
+
|
|
50
|
+
# If type_hint is not a valid EnvironmentValueType, raise an error.
|
|
48
51
|
except KeyError:
|
|
49
52
|
raise OrionisEnvironmentValueError(
|
|
50
53
|
f"Invalid type hint: {type_hint}. Allowed types are: {[e.value for e in EnvironmentValueType]}"
|
|
51
54
|
)
|
|
55
|
+
|
|
56
|
+
# If no type hint is provided, use the type of the value.
|
|
52
57
|
else:
|
|
53
|
-
# If no type hint is provided, use the type of the value.
|
|
54
58
|
type_hint = type(value).__name__.lower()
|
|
55
59
|
|
|
56
60
|
# Return the type hint as a string.
|