orionis 0.347.0__py3-none-any.whl → 0.362.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/container/__init__.py +0 -70
- orionis/container/container.py +2 -2
- orionis/container/context/__init__.py +0 -9
- orionis/container/contracts/__init__.py +0 -9
- orionis/container/entities/__init__.py +0 -7
- orionis/container/entities/binding.py +1 -1
- orionis/container/enums/__init__.py +0 -2
- orionis/container/exceptions/__init__.py +0 -2
- orionis/container/facades/__init__.py +0 -7
- orionis/container/facades/facade.py +1 -2
- orionis/container/providers/__init__.py +0 -7
- orionis/container/resolver/__init__.py +0 -0
- orionis/container/{resolver.py → resolver/resolver.py} +1 -1
- orionis/container/validators/__init__.py +0 -23
- orionis/container/validators/implements.py +8 -1
- orionis/container/validators/is_abstract_class.py +1 -1
- orionis/container/validators/is_callable.py +1 -1
- orionis/container/validators/is_concrete_class.py +1 -1
- orionis/container/validators/is_instance.py +1 -1
- orionis/container/validators/is_not_subclass.py +1 -1
- orionis/container/validators/is_subclass.py +1 -1
- orionis/container/validators/is_valid_alias.py +1 -1
- orionis/container/validators/lifetime.py +1 -1
- orionis/foundation/__init__.py +0 -52
- orionis/foundation/config/__init__.py +0 -128
- orionis/foundation/config/app/__init__.py +0 -10
- orionis/foundation/config/app/entities/__init__.py +0 -7
- orionis/foundation/config/app/entities/app.py +2 -3
- orionis/foundation/config/app/enums/__init__.py +1 -3
- orionis/foundation/config/auth/__init__.py +0 -7
- orionis/foundation/config/auth/entities/__init__.py +0 -7
- orionis/foundation/config/cache/__init__.py +0 -11
- orionis/foundation/config/cache/entities/__init__.py +0 -11
- orionis/foundation/config/cache/entities/cache.py +2 -2
- orionis/foundation/config/cache/entities/file.py +1 -1
- orionis/foundation/config/cache/entities/stores.py +1 -1
- orionis/foundation/config/cache/enums/__init__.py +1 -3
- orionis/foundation/config/cors/__init__.py +0 -7
- orionis/foundation/config/cors/entities/__init__.py +0 -7
- orionis/foundation/config/cors/entities/cors.py +1 -1
- orionis/foundation/config/database/__init__.py +0 -61
- orionis/foundation/config/database/entities/__init__.py +0 -17
- orionis/foundation/config/database/entities/connections.py +1 -1
- orionis/foundation/config/database/entities/database.py +1 -1
- orionis/foundation/config/database/entities/mysql.py +6 -4
- orionis/foundation/config/database/entities/oracle.py +5 -3
- orionis/foundation/config/database/entities/pgsql.py +5 -3
- orionis/foundation/config/database/entities/sqlite.py +5 -3
- orionis/foundation/config/database/enums/__init__.py +8 -8
- orionis/foundation/config/filesystems/__init__.py +0 -17
- orionis/foundation/config/filesystems/entitites/__init__.py +0 -15
- orionis/foundation/config/filesystems/entitites/aws.py +1 -1
- orionis/foundation/config/filesystems/entitites/disks.py +1 -1
- orionis/foundation/config/filesystems/entitites/filesystems.py +1 -1
- orionis/foundation/config/filesystems/entitites/local.py +1 -1
- orionis/foundation/config/filesystems/entitites/public.py +1 -1
- orionis/foundation/config/logging/__init__.py +0 -30
- orionis/foundation/config/logging/entities/__init__.py +0 -21
- orionis/foundation/config/logging/entities/channels.py +1 -1
- orionis/foundation/config/logging/entities/chunked.py +2 -2
- orionis/foundation/config/logging/entities/daily.py +2 -2
- orionis/foundation/config/logging/entities/hourly.py +2 -2
- orionis/foundation/config/logging/entities/logging.py +1 -1
- orionis/foundation/config/logging/entities/monthly.py +2 -2
- orionis/foundation/config/logging/entities/stack.py +2 -2
- orionis/foundation/config/logging/entities/weekly.py +2 -2
- orionis/foundation/config/logging/enums/__init__.py +0 -2
- orionis/foundation/config/mail/__init__.py +0 -15
- orionis/foundation/config/mail/entities/__init__.py +0 -13
- orionis/foundation/config/mail/entities/file.py +1 -1
- orionis/foundation/config/mail/entities/mail.py +1 -1
- orionis/foundation/config/mail/entities/mailers.py +1 -1
- orionis/foundation/config/mail/entities/smtp.py +1 -1
- orionis/foundation/config/queue/__init__.py +0 -20
- orionis/foundation/config/queue/entities/__init__.py +0 -11
- orionis/foundation/config/queue/entities/brokers.py +1 -1
- orionis/foundation/config/queue/entities/database.py +2 -2
- orionis/foundation/config/queue/entities/queue.py +1 -1
- orionis/foundation/config/queue/enums/__init__.py +1 -3
- orionis/foundation/config/roots/__init__.py +0 -7
- orionis/foundation/config/roots/paths.py +1 -1
- orionis/foundation/config/session/__init__.py +0 -20
- orionis/foundation/config/session/entities/__init__.py +0 -7
- orionis/foundation/config/session/entities/session.py +2 -2
- orionis/foundation/config/session/enums/__init__.py +1 -3
- orionis/foundation/config/session/helpers/__init__.py +0 -7
- orionis/foundation/config/startup.py +1 -1
- orionis/foundation/config/testing/__init__.py +0 -14
- orionis/foundation/config/testing/entities/__init__.py +0 -7
- orionis/foundation/config/testing/entities/testing.py +1 -1
- orionis/foundation/config/testing/enums/__init__.py +1 -3
- orionis/foundation/contracts/__init__.py +0 -7
- orionis/foundation/exceptions/__init__.py +2 -4
- orionis/foundation/providers/__init__.py +0 -0
- orionis/metadata/__init__.py +0 -46
- orionis/metadata/framework.py +1 -1
- orionis/patterns/singleton/__init__.py +0 -7
- orionis/services/asynchrony/__init__.py +0 -7
- orionis/services/asynchrony/contracts/__init__.py +0 -7
- orionis/services/asynchrony/coroutines.py +2 -2
- orionis/services/asynchrony/exceptions/__init__.py +1 -3
- orionis/services/environment/__init__.py +0 -7
- orionis/services/environment/contracts/__init__.py +0 -9
- orionis/services/environment/{core/dot_env.py → dot_env.py} +3 -2
- orionis/services/environment/env.py +2 -2
- orionis/services/environment/exceptions/__init__.py +0 -9
- orionis/services/environment/{types/env_types.py → types.py} +2 -1
- orionis/services/introspection/__init__.py +0 -68
- orionis/services/introspection/abstract/__init__.py +0 -7
- orionis/services/introspection/callables/__init__.py +0 -7
- orionis/services/introspection/concretes/__init__.py +0 -7
- orionis/services/introspection/contracts/__init__.py +0 -15
- orionis/services/introspection/dependencies/__init__.py +0 -22
- orionis/services/introspection/dependencies/entities/__init__.py +0 -13
- orionis/services/introspection/exceptions/__init__.py +0 -11
- orionis/services/introspection/instances/__init__.py +0 -7
- orionis/services/introspection/modules/__init__.py +0 -7
- orionis/services/log/__init__.py +0 -7
- orionis/services/parsers/__init__.py +0 -20
- orionis/services/parsers/contracts/__init__.py +0 -7
- orionis/services/parsers/exceptions/__init__.py +0 -7
- orionis/services/paths/__init__.py +0 -24
- orionis/services/paths/contracts/__init__.py +0 -7
- orionis/services/paths/exceptions/__init__.py +0 -9
- orionis/services/system/__init__.py +0 -17
- orionis/services/system/contracts/__init__.py +0 -9
- orionis/support/standard/__init__.py +0 -9
- orionis/support/standard/contracts/__init__.py +0 -5
- orionis/support/standard/exceptions/__init__.py +0 -5
- orionis/support/standard/std.py +2 -2
- orionis/support/wrapper/__init__.py +0 -5
- orionis/support/wrapper/dicts/__init__.py +0 -5
- orionis/test/__init__.py +0 -63
- orionis/test/cases/__init__.py +0 -9
- orionis/test/cases/test_async.py +1 -1
- orionis/test/cases/test_case.py +1 -1
- orionis/test/cases/test_sync.py +1 -1
- orionis/test/contracts/__init__.py +0 -11
- orionis/test/contracts/{unit_test.py → test_unit.py} +2 -2
- orionis/test/entities/__init__.py +0 -5
- orionis/test/entities/test_result.py +1 -1
- orionis/test/enums/__init__.py +0 -7
- orionis/test/exceptions/__init__.py +0 -13
- orionis/test/logs/__init__.py +0 -5
- orionis/test/logs/history.py +4 -3
- orionis/test/output/__init__.py +0 -7
- orionis/test/output/dumper.py +2 -2
- orionis/test/output/printer.py +3 -3
- orionis/test/suite/__init__.py +0 -5
- orionis/test/suite/{unit_test.py → test_unit.py} +10 -7
- orionis/test/test_suite.py +1 -1
- orionis/test/view/__init__.py +0 -5
- orionis/test/view/render.py +2 -2
- orionis/unittesting.py +64 -0
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/METADATA +1 -1
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/RECORD +221 -222
- tests/example/test_example.py +1 -1
- tests/foundation/config/app/test_foundation_config_app.py +1 -1
- tests/foundation/config/auth/test_foundation_config_auth.py +1 -1
- tests/foundation/config/cache/test_foundation_config_cache.py +1 -1
- tests/foundation/config/cache/test_foundation_config_cache_file.py +1 -1
- tests/foundation/config/cache/test_foundation_config_cache_stores.py +1 -1
- tests/foundation/config/cors/test_foundation_config_cors.py +1 -1
- tests/foundation/config/database/test_foundation_config_database.py +1 -1
- tests/foundation/config/database/test_foundation_config_database_connections.py +1 -1
- tests/foundation/config/database/test_foundation_config_database_mysql.py +1 -1
- tests/foundation/config/database/test_foundation_config_database_oracle.py +1 -1
- tests/foundation/config/database/test_foundation_config_database_pgsql.py +1 -1
- tests/foundation/config/database/test_foundation_config_database_sqlite.py +1 -1
- tests/foundation/config/filesystems/test_foundation_config_filesystems.py +1 -1
- tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +1 -1
- tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +1 -1
- tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +1 -1
- tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_channels.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_chunked.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_daily.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_hourly.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +1 -1
- tests/foundation/config/logging/test_foundation_config_logging_weekly.py +1 -1
- tests/foundation/config/mail/test_foundation_config_mail.py +1 -1
- tests/foundation/config/mail/test_foundation_config_mail_file.py +1 -1
- tests/foundation/config/mail/test_foundation_config_mail_mailers.py +1 -1
- tests/foundation/config/mail/test_foundation_config_mail_smtp.py +1 -1
- tests/foundation/config/queue/test_foundation_config_queue.py +1 -1
- tests/foundation/config/queue/test_foundation_config_queue_brokers.py +1 -1
- tests/foundation/config/queue/test_foundation_config_queue_database.py +1 -1
- tests/foundation/config/root/test_foundation_config_root_paths.py +1 -1
- tests/foundation/config/session/test_foundation_config_session.py +1 -1
- tests/foundation/config/startup/test_foundation_config_startup.py +1 -1
- tests/foundation/config/testing/test_foundation_config_testing.py +1 -1
- tests/foundation/exceptions/test_foundation_config_exceptions.py +1 -1
- tests/metadata/test_metadata_framework.py +2 -2
- tests/metadata/test_metadata_package.py +1 -1
- tests/patterns/singleton/test_patterns_singleton.py +2 -2
- tests/services/asynchrony/test_services_asynchrony_coroutine.py +3 -3
- tests/services/environment/test_services_environment.py +3 -3
- tests/services/inspection/dependencies/test_reflect_dependencies.py +1 -1
- tests/services/inspection/reflection/test_reflection_abstract.py +1 -1
- tests/services/inspection/reflection/test_reflection_callable.py +1 -1
- tests/services/inspection/reflection/test_reflection_concrete.py +1 -1
- tests/services/inspection/reflection/test_reflection_instance.py +1 -1
- tests/services/inspection/reflection/test_reflection_module.py +1 -1
- tests/services/inspection/test_reflection.py +1 -1
- tests/services/parsers/test_services_parser_exceptions.py +1 -1
- tests/services/path/test_services_resolver.py +1 -1
- tests/services/system/test_services_system_imports.py +1 -1
- tests/services/system/test_services_system_workers.py +1 -1
- tests/support/standard/test_services_std.py +2 -2
- tests/support/wrapper/test_services_wrapper_docdict.py +2 -2
- tests/testing/test_testing_result.py +1 -1
- tests/testing/test_testing_unit.py +2 -1
- orionis/services/environment/core/__init__.py +0 -7
- orionis/services/environment/helpers/__init__.py +0 -7
- orionis/services/environment/helpers/functions.py +0 -21
- orionis/services/environment/types/__init__.py +0 -7
- /orionis/foundation/exceptions/{value_error.py → value.py} +0 -0
- /orionis/patterns/singleton/{meta_class.py → meta.py} +0 -0
- /orionis/services/asynchrony/exceptions/{coroutine_exception.py → exception.py} +0 -0
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/WHEEL +0 -0
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/top_level.txt +0 -0
- {orionis-0.347.0.dist-info → orionis-0.362.0.dist-info}/zip-safe +0 -0
orionis/container/__init__.py
CHANGED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Import main container classes
|
|
2
|
-
from .container import Container
|
|
3
|
-
from .resolver import Resolver
|
|
4
|
-
|
|
5
|
-
# Import entities
|
|
6
|
-
from .entities import Binding
|
|
7
|
-
|
|
8
|
-
# Import enums
|
|
9
|
-
from .enums import Lifetime
|
|
10
|
-
|
|
11
|
-
# Import exceptions
|
|
12
|
-
from .exceptions import (
|
|
13
|
-
OrionisContainerAttributeError,
|
|
14
|
-
OrionisContainerException,
|
|
15
|
-
OrionisContainerTypeError,
|
|
16
|
-
OrionisContainerValueError
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
# Import contracts/interfaces
|
|
20
|
-
from .contracts import (
|
|
21
|
-
IContainer,
|
|
22
|
-
IServiceProvider
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
# Import validators (commonly used)
|
|
26
|
-
from .validators import (
|
|
27
|
-
ImplementsAbstractMethods,
|
|
28
|
-
IsAbstractClass,
|
|
29
|
-
IsCallable,
|
|
30
|
-
IsConcreteClass,
|
|
31
|
-
IsInstance,
|
|
32
|
-
IsNotSubclass,
|
|
33
|
-
IsSubclass,
|
|
34
|
-
IsValidAlias,
|
|
35
|
-
LifetimeValidator
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
# Define the public API of this module
|
|
39
|
-
__all__ = [
|
|
40
|
-
# Main classes
|
|
41
|
-
"Container",
|
|
42
|
-
"Resolver",
|
|
43
|
-
|
|
44
|
-
# Entities
|
|
45
|
-
"Binding",
|
|
46
|
-
|
|
47
|
-
# Enums
|
|
48
|
-
"Lifetime",
|
|
49
|
-
|
|
50
|
-
# Exceptions
|
|
51
|
-
"OrionisContainerAttributeError",
|
|
52
|
-
"OrionisContainerException",
|
|
53
|
-
"OrionisContainerTypeError",
|
|
54
|
-
"OrionisContainerValueError",
|
|
55
|
-
|
|
56
|
-
# Contracts
|
|
57
|
-
"IContainer",
|
|
58
|
-
"IServiceProvider",
|
|
59
|
-
|
|
60
|
-
# Validators
|
|
61
|
-
"ImplementsAbstractMethods",
|
|
62
|
-
"IsAbstractClass",
|
|
63
|
-
"IsCallable",
|
|
64
|
-
"IsConcreteClass",
|
|
65
|
-
"IsInstance",
|
|
66
|
-
"IsNotSubclass",
|
|
67
|
-
"IsSubclass",
|
|
68
|
-
"IsValidAlias",
|
|
69
|
-
"LifetimeValidator",
|
|
70
|
-
]
|
orionis/container/container.py
CHANGED
|
@@ -4,8 +4,8 @@ from orionis.container.context.manager import ScopeManager
|
|
|
4
4
|
from orionis.container.contracts.container import IContainer
|
|
5
5
|
from orionis.container.entities.binding import Binding
|
|
6
6
|
from orionis.container.enums.lifetimes import Lifetime
|
|
7
|
-
from orionis.container.exceptions
|
|
8
|
-
from orionis.container.resolver import Resolver
|
|
7
|
+
from orionis.container.exceptions import OrionisContainerException
|
|
8
|
+
from orionis.container.resolver.resolver import Resolver
|
|
9
9
|
from orionis.container.validators.implements import ImplementsAbstractMethods
|
|
10
10
|
from orionis.container.validators.is_abstract_class import IsAbstractClass
|
|
11
11
|
from orionis.container.validators.is_callable import IsCallable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from dataclasses import asdict, dataclass, field, fields
|
|
2
2
|
from orionis.container.enums.lifetimes import Lifetime
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerTypeError
|
|
4
4
|
|
|
5
5
|
@dataclass(unsafe_hash=True, kw_only=True)
|
|
6
6
|
class Binding:
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
# Import all necessary components for the container exceptions module
|
|
2
1
|
from .attribute_error import OrionisContainerAttributeError
|
|
3
2
|
from .container_exception import OrionisContainerException
|
|
4
3
|
from .type_error_exception import OrionisContainerTypeError
|
|
5
4
|
from .value_exception import OrionisContainerValueError
|
|
6
5
|
|
|
7
|
-
# Define the public API of this module
|
|
8
6
|
__all__ = [
|
|
9
7
|
"OrionisContainerAttributeError",
|
|
10
8
|
"OrionisContainerException",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
from orionis.container.container import Container
|
|
3
|
-
from orionis.container.exceptions
|
|
4
|
-
from orionis.container.exceptions.container_exception import OrionisContainerException
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerAttributeError, OrionisContainerException
|
|
5
4
|
|
|
6
5
|
class FacadeMeta(type):
|
|
7
6
|
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ from orionis.container.context.scope import ScopedContext
|
|
|
3
3
|
from orionis.container.contracts.container import IContainer
|
|
4
4
|
from orionis.container.entities.binding import Binding
|
|
5
5
|
from orionis.container.enums.lifetimes import Lifetime
|
|
6
|
-
from orionis.container.exceptions
|
|
6
|
+
from orionis.container.exceptions import OrionisContainerException
|
|
7
7
|
from orionis.services.introspection.callables.reflection_callable import ReflectionCallable
|
|
8
8
|
from orionis.services.introspection.concretes.reflection_concrete import ReflectionConcrete
|
|
9
9
|
from orionis.services.introspection.dependencies.entities.resolved_dependencies import ResolvedDependency
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Import container validators
|
|
2
|
-
from .implements import ImplementsAbstractMethods
|
|
3
|
-
from .is_abstract_class import IsAbstractClass
|
|
4
|
-
from .is_callable import IsCallable
|
|
5
|
-
from .is_concrete_class import IsConcreteClass
|
|
6
|
-
from .is_instance import IsInstance
|
|
7
|
-
from .is_not_subclass import IsNotSubclass
|
|
8
|
-
from .is_subclass import IsSubclass
|
|
9
|
-
from .is_valid_alias import IsValidAlias
|
|
10
|
-
from .lifetime import LifetimeValidator
|
|
11
|
-
|
|
12
|
-
# Define the public API of this module
|
|
13
|
-
__all__ = [
|
|
14
|
-
"ImplementsAbstractMethods",
|
|
15
|
-
"IsAbstractClass",
|
|
16
|
-
"IsCallable",
|
|
17
|
-
"IsConcreteClass",
|
|
18
|
-
"IsInstance",
|
|
19
|
-
"IsNotSubclass",
|
|
20
|
-
"IsSubclass",
|
|
21
|
-
"IsValidAlias",
|
|
22
|
-
"LifetimeValidator",
|
|
23
|
-
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Callable, Any
|
|
2
2
|
from orionis.services.introspection.inspection import Inspection
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerException
|
|
4
4
|
|
|
5
5
|
class __ImplementsAbstractMethods:
|
|
6
6
|
"""
|
|
@@ -31,9 +31,12 @@ class __ImplementsAbstractMethods:
|
|
|
31
31
|
OrionisContainerException
|
|
32
32
|
If any abstract method is not implemented.
|
|
33
33
|
"""
|
|
34
|
+
|
|
35
|
+
# Validate that the abstract class is provided
|
|
34
36
|
if abstract is None:
|
|
35
37
|
raise OrionisContainerException("Abstract class must be provided for implementation check.")
|
|
36
38
|
|
|
39
|
+
# Check if the abstract class has abstract methods
|
|
37
40
|
abstract_methods = getattr(abstract, '__abstractmethods__', set())
|
|
38
41
|
if not abstract_methods:
|
|
39
42
|
raise OrionisContainerException(
|
|
@@ -41,20 +44,24 @@ class __ImplementsAbstractMethods:
|
|
|
41
44
|
"An abstract class must have at least one abstract method."
|
|
42
45
|
)
|
|
43
46
|
|
|
47
|
+
# Determine the target class or instance to check
|
|
44
48
|
target = concrete if concrete is not None else instance
|
|
45
49
|
if target is None:
|
|
46
50
|
raise OrionisContainerException("Either concrete class or instance must be provided for implementation check.")
|
|
47
51
|
|
|
52
|
+
# Validate that the target is a class or instance
|
|
48
53
|
target_class = target if Inspection(target).isClass() else target.__class__
|
|
49
54
|
target_name = target_class.__name__
|
|
50
55
|
abstract_name = abstract.__name__
|
|
51
56
|
|
|
57
|
+
# Check if the target class implements all abstract methods
|
|
52
58
|
not_implemented = []
|
|
53
59
|
for method in abstract_methods:
|
|
54
60
|
expected_method = str(method).replace(f"_{abstract_name}", f"_{target_name}")
|
|
55
61
|
if not expected_method in target_class.__dict__:
|
|
56
62
|
not_implemented.append(method)
|
|
57
63
|
|
|
64
|
+
# If any abstract methods are not implemented, raise an exception
|
|
58
65
|
if not_implemented:
|
|
59
66
|
formatted = "\n • " + "\n • ".join(not_implemented)
|
|
60
67
|
raise OrionisContainerException(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Callable, Any
|
|
2
2
|
from orionis.services.introspection.abstract.reflection_abstract import ReflectionAbstract
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerTypeError
|
|
4
4
|
|
|
5
5
|
class __IsAbstractClass:
|
|
6
6
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Callable, Any
|
|
2
2
|
from orionis.services.introspection.concretes.reflection_concrete import ReflectionConcrete
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerTypeError
|
|
4
4
|
|
|
5
5
|
class __IsConcreteClass:
|
|
6
6
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
from orionis.services.introspection.instances.reflection_instance import ReflectionInstance
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerTypeError
|
|
4
4
|
|
|
5
5
|
class __IsInstance:
|
|
6
6
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Any, Union
|
|
2
2
|
from orionis.container.enums.lifetimes import Lifetime
|
|
3
|
-
from orionis.container.exceptions
|
|
3
|
+
from orionis.container.exceptions import OrionisContainerTypeError
|
|
4
4
|
|
|
5
5
|
class __LifetimeValidator:
|
|
6
6
|
"""
|
orionis/foundation/__init__.py
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Import main foundation classes
|
|
2
|
-
from .application import App
|
|
3
|
-
|
|
4
|
-
# Import configuration components
|
|
5
|
-
from .config import (
|
|
6
|
-
Configuration,
|
|
7
|
-
App as AppConfig,
|
|
8
|
-
Cipher,
|
|
9
|
-
Environments,
|
|
10
|
-
Auth,
|
|
11
|
-
Cache,
|
|
12
|
-
CacheFile,
|
|
13
|
-
Stores,
|
|
14
|
-
CacheDrivers,
|
|
15
|
-
Cors,
|
|
16
|
-
Paths
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
# Import contracts
|
|
20
|
-
from .contracts import IConfig
|
|
21
|
-
|
|
22
|
-
# Import exceptions
|
|
23
|
-
from .exceptions import (
|
|
24
|
-
OrionisIntegrityException,
|
|
25
|
-
OrionisValueError
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
# Define the public API of this module
|
|
29
|
-
__all__ = [
|
|
30
|
-
# Main foundation class
|
|
31
|
-
"App",
|
|
32
|
-
|
|
33
|
-
# Configuration
|
|
34
|
-
"Configuration",
|
|
35
|
-
"AppConfig",
|
|
36
|
-
"Cipher",
|
|
37
|
-
"Environments",
|
|
38
|
-
"Auth",
|
|
39
|
-
"Cache",
|
|
40
|
-
"CacheFile",
|
|
41
|
-
"Stores",
|
|
42
|
-
"CacheDrivers",
|
|
43
|
-
"Cors",
|
|
44
|
-
"Paths",
|
|
45
|
-
|
|
46
|
-
# Contracts
|
|
47
|
-
"IConfig",
|
|
48
|
-
|
|
49
|
-
# Exceptions
|
|
50
|
-
"OrionisIntegrityException",
|
|
51
|
-
"OrionisValueError",
|
|
52
|
-
]
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Import configuration startup
|
|
2
|
-
from .startup import Configuration
|
|
3
|
-
|
|
4
|
-
# Import specific configuration modules
|
|
5
|
-
from .app import App, Cipher, Environments
|
|
6
|
-
from .auth import Auth
|
|
7
|
-
from .cache import Cache, File as CacheFile, Stores, Drivers as CacheDrivers
|
|
8
|
-
from .cors import Cors
|
|
9
|
-
from .database import (
|
|
10
|
-
Connections,
|
|
11
|
-
Database,
|
|
12
|
-
MySQL,
|
|
13
|
-
Oracle,
|
|
14
|
-
PGSQL,
|
|
15
|
-
SQLite,
|
|
16
|
-
MySQLCharset,
|
|
17
|
-
MySQLCollation,
|
|
18
|
-
MySQLEngine,
|
|
19
|
-
OracleEncoding,
|
|
20
|
-
OracleNencoding,
|
|
21
|
-
PGSQLCharset,
|
|
22
|
-
PGSQLCollation,
|
|
23
|
-
PGSQLSSLMode,
|
|
24
|
-
SQLiteForeignKey,
|
|
25
|
-
SQLiteJournalMode,
|
|
26
|
-
SQLiteSynchronous
|
|
27
|
-
)
|
|
28
|
-
from .filesystems import S3, Disks, Filesystems, Local, Public
|
|
29
|
-
from .logging import (
|
|
30
|
-
Channels,
|
|
31
|
-
Chunked,
|
|
32
|
-
Daily,
|
|
33
|
-
Hourly,
|
|
34
|
-
Logging,
|
|
35
|
-
Monthly,
|
|
36
|
-
Stack,
|
|
37
|
-
Weekly,
|
|
38
|
-
Level
|
|
39
|
-
)
|
|
40
|
-
from .mail import File as MailFile, Mail, Mailers, Smtp
|
|
41
|
-
from .queue import Brokers, Database as QueueDatabase, Queue, Strategy
|
|
42
|
-
from .roots import Paths
|
|
43
|
-
from .session import Session, SameSitePolicy, SecretKey
|
|
44
|
-
from .testing import Testing, ExecutionMode
|
|
45
|
-
|
|
46
|
-
# Define the public API of this module
|
|
47
|
-
__all__ = [
|
|
48
|
-
# Main configuration
|
|
49
|
-
"Configuration",
|
|
50
|
-
|
|
51
|
-
# App configuration
|
|
52
|
-
"App",
|
|
53
|
-
"Cipher",
|
|
54
|
-
"Environments",
|
|
55
|
-
|
|
56
|
-
# Auth configuration
|
|
57
|
-
"Auth",
|
|
58
|
-
|
|
59
|
-
# Cache configuration
|
|
60
|
-
"Cache",
|
|
61
|
-
"CacheFile",
|
|
62
|
-
"Stores",
|
|
63
|
-
"CacheDrivers",
|
|
64
|
-
|
|
65
|
-
# CORS configuration
|
|
66
|
-
"Cors",
|
|
67
|
-
|
|
68
|
-
# Database configuration
|
|
69
|
-
"Connections",
|
|
70
|
-
"Database",
|
|
71
|
-
"MySQL",
|
|
72
|
-
"Oracle",
|
|
73
|
-
"PGSQL",
|
|
74
|
-
"SQLite",
|
|
75
|
-
"MySQLCharset",
|
|
76
|
-
"MySQLCollation",
|
|
77
|
-
"MySQLEngine",
|
|
78
|
-
"OracleEncoding",
|
|
79
|
-
"OracleNencoding",
|
|
80
|
-
"PGSQLCharset",
|
|
81
|
-
"PGSQLCollation",
|
|
82
|
-
"PGSQLSSLMode",
|
|
83
|
-
"SQLiteForeignKey",
|
|
84
|
-
"SQLiteJournalMode",
|
|
85
|
-
"SQLiteSynchronous",
|
|
86
|
-
|
|
87
|
-
# Filesystems configuration
|
|
88
|
-
"S3",
|
|
89
|
-
"Disks",
|
|
90
|
-
"Filesystems",
|
|
91
|
-
"Local",
|
|
92
|
-
"Public",
|
|
93
|
-
|
|
94
|
-
# Logging configuration
|
|
95
|
-
"Channels",
|
|
96
|
-
"Chunked",
|
|
97
|
-
"Daily",
|
|
98
|
-
"Hourly",
|
|
99
|
-
"Logging",
|
|
100
|
-
"Monthly",
|
|
101
|
-
"Stack",
|
|
102
|
-
"Weekly",
|
|
103
|
-
"Level",
|
|
104
|
-
|
|
105
|
-
# Mail configuration
|
|
106
|
-
"MailFile",
|
|
107
|
-
"Mail",
|
|
108
|
-
"Mailers",
|
|
109
|
-
"Smtp",
|
|
110
|
-
|
|
111
|
-
# Queue configuration
|
|
112
|
-
"Brokers",
|
|
113
|
-
"QueueDatabase",
|
|
114
|
-
"Queue",
|
|
115
|
-
"Strategy",
|
|
116
|
-
|
|
117
|
-
# Paths configuration
|
|
118
|
-
"Paths",
|
|
119
|
-
|
|
120
|
-
# Session configuration
|
|
121
|
-
"Session",
|
|
122
|
-
"SameSitePolicy",
|
|
123
|
-
"SecretKey",
|
|
124
|
-
|
|
125
|
-
# Testing configuration
|
|
126
|
-
"Testing",
|
|
127
|
-
"ExecutionMode",
|
|
128
|
-
]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from dataclasses import asdict, dataclass, field, fields
|
|
2
|
-
from orionis.foundation.config.app.enums
|
|
3
|
-
from orionis.foundation.
|
|
4
|
-
from orionis.foundation.exceptions.integrity import OrionisIntegrityException
|
|
2
|
+
from orionis.foundation.config.app.enums import Cipher, Environments
|
|
3
|
+
from orionis.foundation.exceptions import OrionisIntegrityException
|
|
5
4
|
from orionis.services.environment.env import Env
|
|
6
5
|
from orionis.services.system.workers import Workers
|
|
7
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from dataclasses import asdict, dataclass, field, fields
|
|
2
2
|
from orionis.foundation.config.cache.entities.stores import Stores
|
|
3
|
-
from orionis.foundation.config.cache.enums
|
|
4
|
-
from orionis.foundation.exceptions
|
|
3
|
+
from orionis.foundation.config.cache.enums import Drivers
|
|
4
|
+
from orionis.foundation.exceptions import OrionisIntegrityException
|
|
5
5
|
from orionis.services.environment.env import Env
|
|
6
6
|
|
|
7
7
|
@dataclass(unsafe_hash=True, kw_only=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from dataclasses import asdict, dataclass, field, fields
|
|
2
2
|
from orionis.foundation.config.cache.entities.file import File
|
|
3
|
-
from orionis.foundation.exceptions
|
|
3
|
+
from orionis.foundation.exceptions import OrionisIntegrityException
|
|
4
4
|
|
|
5
5
|
@dataclass(unsafe_hash=True, kw_only=True)
|
|
6
6
|
class Stores:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from dataclasses import dataclass, field, asdict, fields
|
|
2
2
|
from typing import List, Optional
|
|
3
|
-
from orionis.foundation.exceptions
|
|
3
|
+
from orionis.foundation.exceptions import OrionisIntegrityException
|
|
4
4
|
|
|
5
5
|
@dataclass(unsafe_hash=True, kw_only=True)
|
|
6
6
|
class Cors:
|