mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-12-06 00:14:07 +03:00
29f209d382
* Fix dependency provider stub issue with required init arg * Refactor bundles example app * Rename bundles package * Rename bundles example container * Rename bundles mini app to decoupled packages * Move decoupled packages example to main examples * Fix a typo * Add meta
18 lines
442 B
Python
18 lines
442 B
Python
"""Analytics containers module."""
|
|
|
|
from dependency_injector import containers, providers
|
|
|
|
from . import services
|
|
|
|
|
|
class AnalyticsContainer(containers.DeclarativeContainer):
|
|
|
|
user_repository = providers.Dependency()
|
|
photo_repository = providers.Dependency()
|
|
|
|
aggregation_service = providers.Singleton(
|
|
services.AggregationService,
|
|
user_repository=user_repository,
|
|
photo_repository=photo_repository,
|
|
)
|