utils.validate_api_key module

This module provides a dependency to validate API keys for securing FastAPI endpoints.

utils.validate_api_key.validate_api_key(api_key: str = Depends(APIKeyHeader))[source]

Validate the provided API key against the expected value.

Parameters:

api_key (str) – The API key provided in the request header.

Raises:

HTTPException – If the API key is invalid.

Returns:

None