Files
labFusion/services/service-adapters
GSRN 4dc2f147ec
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 37s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m16s
Integration Tests / integration-tests (push) Failing after 58s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 12s
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m42s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 46s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 47s
Service Adapters (Python FastAPI) / build (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m53s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 45s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 28s
fix: Standardize isort command in CI workflows
### Summary of Changes
- Updated the `isort` command in both CI workflows to include the `--profile black` option for consistent code formatting.
- Refactored function definitions in service adapters to improve readability by consolidating parameters into single lines.

### Expected Results
- Enhanced consistency in code formatting checks across CI workflows, ensuring adherence to the Black style guide.
- Improved readability and maintainability of function definitions in service adapters.
2025-09-15 21:16:37 +02:00
..
2025-09-11 22:08:12 +02:00
2025-09-11 22:08:12 +02:00

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 information
  • GET /health - Health check
  • GET /services - Service status
  • GET /home-assistant/entities - HA entities
  • GET /frigate/events - Frigate events
  • GET /immich/assets - Immich assets
  • POST /publish-event - Publish events
  • GET /events - Retrieve events

Development Status

Complete - Core functionality implemented with modular architecture