Spaces:
Sleeping
Sleeping
| """ | |
| Backend Utilities | |
| """ | |
| from .validators import ( | |
| validate_uuid, | |
| validate_user_id, | |
| validate_ids, | |
| sanitize_string, | |
| validate_pagination, | |
| validate_enum, | |
| validate_coordinates, | |
| ) | |
| from .logging_config import ( | |
| setup_logging, | |
| get_logger, | |
| log_with_context, | |
| log_api_request, | |
| log_db_query, | |
| log_ai_request, | |
| ) | |
| from .error_responses import ( | |
| ErrorDetail, | |
| ErrorResponse, | |
| ErrorCodes, | |
| create_error_response, | |
| bad_request_error, | |
| unauthorized_error, | |
| forbidden_error, | |
| not_found_error, | |
| conflict_error, | |
| rate_limit_error, | |
| internal_server_error, | |
| service_unavailable_error, | |
| ) | |
| from .env_validator import ( | |
| validate_backend_env, | |
| print_env_summary, | |
| EnvValidationError, | |
| ) | |
| from .cache_utils import ( | |
| create_params_hash, | |
| normalize_params_for_cache, | |
| calculate_cache_similarity, | |
| ) | |
| from .context_compression import ( | |
| compress_spot, | |
| compress_spots, | |
| create_compression_guide, | |
| decompress_course_spots, | |
| calculate_compression_ratio, | |
| ) | |
| from .geo import ( | |
| EARTH_RADIUS_KM, | |
| haversine, | |
| ) | |
| __all__ = [ | |
| "validate_uuid", | |
| "validate_user_id", | |
| "validate_ids", | |
| "sanitize_string", | |
| "validate_pagination", | |
| "validate_enum", | |
| "validate_coordinates", | |
| "setup_logging", | |
| "get_logger", | |
| "log_with_context", | |
| "log_api_request", | |
| "log_db_query", | |
| "log_ai_request", | |
| "ErrorDetail", | |
| "ErrorResponse", | |
| "ErrorCodes", | |
| "create_error_response", | |
| "bad_request_error", | |
| "unauthorized_error", | |
| "forbidden_error", | |
| "not_found_error", | |
| "conflict_error", | |
| "rate_limit_error", | |
| "internal_server_error", | |
| "service_unavailable_error", | |
| "validate_backend_env", | |
| "print_env_summary", | |
| "EnvValidationError", | |
| "create_params_hash", | |
| "normalize_params_for_cache", | |
| "calculate_cache_similarity", | |
| "compress_spot", | |
| "compress_spots", | |
| "create_compression_guide", | |
| "decompress_course_spots", | |
| "calculate_compression_ratio", | |
| "EARTH_RADIUS_KM", | |
| "haversine", | |
| ] | |