julee.api.dependencies¶
Dependency injection for julee FastAPI endpoints.
This module provides dependency injection for the julee API endpoints, following the same patterns established in the sample project. It manages singleton lifecycle for expensive resources and provides clean separation between infrastructure concerns and business logic.
The dependencies focus on real Minio implementations for production use, with test overrides available through FastAPI’s dependency override system.
Attributes¶
Classes¶
Dependency injection container with singleton lifecycle management. |
|
Provider for dependencies needed during application startup. |
Functions¶
|
FastAPI dependency for AssemblySpecificationRepository. |
|
FastAPI dependency for DocumentRepository. |
|
FastAPI dependency for KnowledgeServiceConfigRepository. |
|
FastAPI dependency for KnowledgeServiceQueryRepository. |
FastAPI dependency for Minio client. |
|
Get startup dependencies provider for lifespan contexts. |
|
FastAPI dependency for Temporal client. |
Module Contents¶
- class julee.api.dependencies.DependencyContainer[source]¶
Dependency injection container with singleton lifecycle management. Always creates real clients; mocks are provided by test overrides.
- class julee.api.dependencies.StartupDependenciesProvider(container)[source]¶
Provider for dependencies needed during application startup.
This class provides clean access to repositories and services needed during the lifespan startup phase, without exposing internal container details or requiring FastAPI’s dependency injection system.
- async get_assembly_specification_repository()[source]¶
Get assembly specification repository for startup dependencies.
- async get_knowledge_service_config_repository()[source]¶
Get knowledge service config repository for startup.
- async get_knowledge_service_query_repository()[source]¶
Get knowledge service query repository for startup dependencies.
- async julee.api.dependencies.get_assembly_specification_repository(minio_client=Depends(get_minio_client))[source]¶
FastAPI dependency for AssemblySpecificationRepository.
- async julee.api.dependencies.get_document_repository(minio_client=Depends(get_minio_client))[source]¶
FastAPI dependency for DocumentRepository.
- async julee.api.dependencies.get_knowledge_service_config_repository(minio_client=Depends(get_minio_client))[source]¶
FastAPI dependency for KnowledgeServiceConfigRepository.
- async julee.api.dependencies.get_knowledge_service_query_repository(minio_client=Depends(get_minio_client))[source]¶
FastAPI dependency for KnowledgeServiceQueryRepository.