MCPcopy
hub / github.com/encode/starlette / FormData

Class FormData

starlette/datastructures.py:482–497  ·  starlette/datastructures.py::FormData

An immutable multidict, containing both file uploads and text input.

Source from the content-addressed store, hash-verified

480
481
482class FormData(ImmutableMultiDict[str, UploadFile | str]):
483 class="st">"""
484 An immutable multidict, containing both file uploads and text input.
485 class="st">"""
486
487 def __init__(
488 self,
489 *args: FormData | Mapping[str, str | UploadFile] | list[tuple[str, str | UploadFile]],
490 **kwargs: str | UploadFile,
491 ) -> None:
492 super().__init__(*args, **kwargs)
493
494 async def close(self) -> None:
495 for key, value in self.multi_items():
496 if isinstance(value, UploadFile):
497 await value.close()
498
499
500class Headers(Mapping[str, str]):

Callers 4

parseMethod · 0.90
parseMethod · 0.90
_get_formMethod · 0.90
test_formdataFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_formdataFunction · 0.72