2015-08-31 16:31:38 +03:00
|
|
|
"""Dependency injector."""
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector.catalogs import (
|
|
|
|
DeclarativeCatalog,
|
|
|
|
AbstractCatalog,
|
|
|
|
DynamicCatalog,
|
|
|
|
CatalogBundle,
|
|
|
|
override,
|
|
|
|
)
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector.providers import (
|
|
|
|
Provider,
|
|
|
|
Delegate,
|
|
|
|
Callable,
|
|
|
|
DelegatedCallable,
|
|
|
|
Factory,
|
|
|
|
DelegatedFactory,
|
|
|
|
Singleton,
|
|
|
|
DelegatedSingleton,
|
|
|
|
ExternalDependency,
|
|
|
|
StaticProvider,
|
|
|
|
Class,
|
|
|
|
Object,
|
|
|
|
Function,
|
|
|
|
Value,
|
|
|
|
Config,
|
|
|
|
)
|
2015-01-04 16:54:25 +03:00
|
|
|
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector.injections import (
|
|
|
|
Injection,
|
|
|
|
Arg,
|
|
|
|
KwArg,
|
|
|
|
Attribute,
|
|
|
|
Method,
|
|
|
|
inject,
|
|
|
|
)
|
2015-04-14 23:17:53 +03:00
|
|
|
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector.utils import (
|
|
|
|
is_provider,
|
|
|
|
ensure_is_provider,
|
|
|
|
is_delegated_provider,
|
|
|
|
is_injection,
|
|
|
|
ensure_is_injection,
|
|
|
|
is_arg_injection,
|
|
|
|
is_kwarg_injection,
|
|
|
|
is_attribute_injection,
|
|
|
|
is_method_injection,
|
|
|
|
is_catalog,
|
|
|
|
is_dynamic_catalog,
|
|
|
|
is_declarative_catalog,
|
|
|
|
is_catalog_bundle,
|
|
|
|
ensure_is_catalog_bundle,
|
|
|
|
)
|
2015-09-01 15:01:15 +03:00
|
|
|
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector.errors import (
|
|
|
|
Error,
|
|
|
|
UndefinedProviderError,
|
|
|
|
)
|
2015-03-14 01:02:01 +03:00
|
|
|
|
2015-11-10 20:47:45 +03:00
|
|
|
# Backward compatibility for versions < 0.11.*
|
2016-04-03 17:27:53 +03:00
|
|
|
from dependency_injector import catalogs
|
2015-11-10 20:38:18 +03:00
|
|
|
catalog = catalogs
|
2015-03-10 12:51:13 +03:00
|
|
|
|
2016-04-23 15:19:01 +03:00
|
|
|
VERSION = '1.16.3'
|
2015-11-23 21:56:34 +03:00
|
|
|
"""Version number that follows semantic versioning.
|
|
|
|
|
|
|
|
:type: str
|
|
|
|
"""
|
2015-10-23 15:20:25 +03:00
|
|
|
|
|
|
|
|
2015-09-01 15:01:15 +03:00
|
|
|
__all__ = (
|
|
|
|
# Catalogs
|
2015-11-10 11:42:29 +03:00
|
|
|
'DeclarativeCatalog',
|
2015-09-01 15:01:15 +03:00
|
|
|
'AbstractCatalog',
|
2015-11-10 18:58:04 +03:00
|
|
|
'DynamicCatalog',
|
2015-10-19 12:12:38 +03:00
|
|
|
'CatalogBundle',
|
2015-09-01 15:01:15 +03:00
|
|
|
'override',
|
|
|
|
|
|
|
|
# Providers
|
|
|
|
'Provider',
|
|
|
|
'Delegate',
|
2015-12-28 18:25:25 +03:00
|
|
|
'Callable',
|
|
|
|
'DelegatedCallable',
|
2015-09-01 15:01:15 +03:00
|
|
|
'Factory',
|
2015-12-28 18:25:25 +03:00
|
|
|
'DelegatedFactory',
|
2015-09-01 15:01:15 +03:00
|
|
|
'Singleton',
|
2015-12-28 18:25:25 +03:00
|
|
|
'DelegatedSingleton',
|
2015-09-01 15:01:15 +03:00
|
|
|
'ExternalDependency',
|
2015-09-14 10:53:24 +03:00
|
|
|
'StaticProvider',
|
2015-09-01 15:01:15 +03:00
|
|
|
'Class',
|
|
|
|
'Object',
|
|
|
|
'Function',
|
|
|
|
'Value',
|
|
|
|
'Config',
|
|
|
|
|
|
|
|
# Injections
|
2015-09-01 15:08:42 +03:00
|
|
|
'Injection',
|
2015-10-14 14:30:01 +03:00
|
|
|
'Arg',
|
2015-09-01 15:01:15 +03:00
|
|
|
'KwArg',
|
|
|
|
'Attribute',
|
|
|
|
'Method',
|
|
|
|
'inject',
|
|
|
|
|
|
|
|
# Utils
|
|
|
|
'is_provider',
|
|
|
|
'ensure_is_provider',
|
2015-12-28 18:25:25 +03:00
|
|
|
'is_delegated_provider',
|
2015-09-01 15:01:15 +03:00
|
|
|
'is_injection',
|
|
|
|
'ensure_is_injection',
|
2015-10-14 14:30:01 +03:00
|
|
|
'is_arg_injection',
|
2015-09-01 15:01:15 +03:00
|
|
|
'is_kwarg_injection',
|
|
|
|
'is_attribute_injection',
|
|
|
|
'is_method_injection',
|
2015-10-07 13:36:28 +03:00
|
|
|
'is_catalog',
|
2015-11-10 20:38:18 +03:00
|
|
|
'is_dynamic_catalog',
|
|
|
|
'is_declarative_catalog',
|
2015-10-19 12:12:38 +03:00
|
|
|
'is_catalog_bundle',
|
|
|
|
'ensure_is_catalog_bundle',
|
2015-09-01 15:01:15 +03:00
|
|
|
|
|
|
|
# Errors
|
|
|
|
'Error',
|
2015-11-12 14:43:54 +03:00
|
|
|
'UndefinedProviderError',
|
2015-10-23 15:20:25 +03:00
|
|
|
|
|
|
|
# Version
|
|
|
|
'VERSION'
|
2015-09-01 15:01:15 +03:00
|
|
|
)
|