weather_provider_api.core.utils package

Submodules

weather_provider_api.core.utils.example_responses module

prepare_example_response(example_response, content_type='application/json')
A method to translate simple output example lists and dictionaries into FastAPI response dictionaries fit for

use within the OpenAPI specifications and Swagger UI.

Args:

example_response (dict | list): An example response object (either a list or dict of items) content_type: A string holding the output content type.

Returns:

A FastAPI response dictionary fit for the OpenAPI specifications (and Swagger UI)

Parameters:

content_type (str)

Return type:

dict

Module contents