- Handler base class with graceful shutdown and signal handling - NATSClient with JetStream and msgpack serialization - Pydantic Settings for environment configuration - HealthServer for Kubernetes probes - OpenTelemetry telemetry setup - Service clients: STT, TTS, LLM, Embeddings, Reranker, Milvus
66 lines
1.3 KiB
TOML
66 lines
1.3 KiB
TOML
[project]
|
|
name = "handler-base"
|
|
version = "1.0.0"
|
|
description = "Shared base library for AI/ML handler services"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "MIT" }
|
|
authors = [{ name = "Davies Tech Labs" }]
|
|
|
|
dependencies = [
|
|
# Async & messaging
|
|
"nats-py>=2.7.0",
|
|
"httpx>=0.27.0",
|
|
"msgpack>=1.0.0",
|
|
|
|
# Data stores
|
|
"pymilvus>=2.4.0",
|
|
"redis>=5.0.0",
|
|
|
|
# Observability
|
|
"opentelemetry-api>=1.20.0",
|
|
"opentelemetry-sdk>=1.20.0",
|
|
"opentelemetry-exporter-otlp-proto-grpc>=1.20.0",
|
|
"opentelemetry-exporter-otlp-proto-http>=1.20.0",
|
|
"opentelemetry-instrumentation-httpx>=0.44b0",
|
|
"opentelemetry-instrumentation-logging>=0.44b0",
|
|
|
|
# MLflow
|
|
"mlflow>=2.10.0",
|
|
"psycopg2-binary>=2.9.0",
|
|
|
|
# Utilities
|
|
"numpy>=1.26.0",
|
|
"pydantic>=2.5.0",
|
|
"pydantic-settings>=2.1.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
audio = [
|
|
"soundfile>=0.12.0",
|
|
"librosa>=0.10.0",
|
|
"webrtcvad>=2.0.10",
|
|
]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
"ruff>=0.1.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["handler_base"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "W"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|