Skip to content

Core Components

The core components provide fundamental services and abstractions used throughout the SSF Tools application.

Service Interfaces

Design Patterns

All core components follow these patterns:

  1. Interface-First Design: Each component defines a clear interface contract
  2. Dependency Injection: Services are injected rather than instantiated
  3. Type Safety: Full type annotations and runtime validation
  4. Error Handling: Comprehensive error handling with user-friendly messages
  5. Testing: Each component includes comprehensive unit tests

Usage

Core components are registered in the main DI container and available throughout the application:

from kp_ssf_tools.containers import ApplicationContainer

container = ApplicationContainer()
container.wire(modules=[__name__])

# Services are automatically injected
@container.core.config()
def get_config() -> ConfigService:
    pass