pandera.typing.fastapi.UploadFile#

class pandera.typing.fastapi.UploadFile(data, filename, file, *args, **kwargs)[source]#

Pandera-specific subclass of fastapi.UploadFile.

This type uses pandera.typing.DataFrame to read files into dataframe format based on the pandera.models.SchemaModel configuration.

Initialize UploadFile object that has a data property that contains validated data.

Parameters

data (Any) – pandera-validated data

Filename

__init__(data, filename, file, *args, **kwargs)[source]#

Initialize UploadFile object that has a data property that contains validated data.

Parameters

data (Any) – pandera-validated data

Filename

Methods

__init__(data, filename, file, *args, **kwargs)

Initialize UploadFile object that has a data property that contains validated data.

close()

rtype

None

pydantic_validate(obj, field)

Pydantic validation method for validating dataframes in the context of a file upload.

read([size])

rtype

Union[bytes, str]

seek(offset)

rtype

None

validate(v)

rtype

Any

write(data)

rtype

None

Attributes

data

spool_max_size