__init__.py 658 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. """
  3. Service-Scopes für Dependency Injection.
  4. Bietet verschiedene Lebenszyklus-Strategien für Services:
  5. - Singleton: Eine Instanz pro Container
  6. - Transient: Neue Instanz pro Abruf
  7. - Scoped: Eine Instanz pro Request/Scope
  8. """
  9. from trixy_core.service.scopes.scope import ServiceScope, ScopeContext
  10. from trixy_core.service.scopes.singleton import SingletonScope
  11. from trixy_core.service.scopes.transient import TransientScope
  12. from trixy_core.service.scopes.scoped import RequestScope, ScopedScope
  13. __all__ = [
  14. "ServiceScope",
  15. "ScopeContext",
  16. "SingletonScope",
  17. "TransientScope",
  18. "RequestScope",
  19. "ScopedScope",
  20. ]