Some checks failed
Integration Tests / integration-tests (push) Failing after 28s
Integration Tests / performance-tests (push) Has been skipped
Docker Build and Push / build-and-push (push) Failing after 32s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 39s
Service Adapters (Python FastAPI) / test (3.14) (push) Failing after 10s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 42s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 40s
Service Adapters (Python FastAPI) / build (push) Has been skipped
### Summary of Changes - Updated the type hinting in `events.py` to use `cast` for the list of events retrieved from Redis, ensuring type safety and clarity in the code. ### Expected Results - Improved type checking and maintainability of the service-adapters module, enhancing overall code quality.
Service Adapters
Python FastAPI service for integrating with external homelab services.
Purpose
- Integrate with Home Assistant, Frigate, Immich, n8n
- Transform external service data into standardized format
- Publish events to the message bus
- Provide unified API for service data
Technology Stack
- Language: Python 3.11
- Framework: FastAPI
- Port: 8000
- Message Bus: Redis
- Documentation: OpenAPI/Swagger
Features
- Home Assistant entity integration
- Frigate event processing
- Immich asset management
- n8n workflow triggers
- Event publishing to Redis
- Comprehensive OpenAPI documentation
- Modular architecture for maintainability
Project Structure
service-adapters/
├── main.py # FastAPI application (40 lines)
├── models/
│ ├── schemas.py # Pydantic models
├── routes/
│ ├── general.py # Root, health, services
│ ├── home_assistant.py # HA integration
│ ├── frigate.py # Frigate integration
│ ├── immich.py # Immich integration
│ └── events.py # Event management
└── services/
├── config.py # Service configurations
└── redis_client.py # Redis connection
API Endpoints
GET /- API informationGET /health- Health checkGET /services- Service statusGET /home-assistant/entities- HA entitiesGET /frigate/events- Frigate eventsGET /immich/assets- Immich assetsPOST /publish-event- Publish eventsGET /events- Retrieve events
Development Status
✅ Complete - Core functionality implemented with modular architecture