mirror_api package

An API that returns the structure of the request as the response

Submodules

mirror_api.app module

mirror_api.app.create_app()[source]
Return type:

FastAPI

mirror_api.reflected_response module

class mirror_api.reflected_response.ReflectedResponse(**data)[source]

Bases: BaseModel

api_path: str
body: str
cookies: Optional[Dict[str, str]]
form: Optional[Dict[str, str]]
async classmethod from_request(request, api_path)[source]
Return type:

ReflectedResponse

headers: Optional[Dict[str, str]]
json_: Union[dict, list, None]
method: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'api_path': FieldInfo(annotation=str, required=True), 'body': FieldInfo(annotation=str, required=True), 'cookies': FieldInfo(annotation=Union[Dict[str, str], NoneType], required=True), 'form': FieldInfo(annotation=Union[Dict[str, str], NoneType], required=True), 'headers': FieldInfo(annotation=Union[Dict[str, str], NoneType], required=True), 'json_': FieldInfo(annotation=Union[dict, list, NoneType], required=True, alias='json', alias_priority=2), 'method': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

url: str