Media
datapizza.type.Media
A class for storing the media response from a client.
__init__
A class for storing the media response from a client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extension
|
str
|
The file extension of the media. Defaults to None. |
None
|
media_type
|
Literal['image', 'video', 'audio', 'pdf']
|
The type of media. Defaults to "image". |
required |
source_type
|
Literal['url', 'base64', 'path', 'pil', 'raw']
|
The source type of the media. Defaults to "url". |
required |
source
|
Any
|
The source of the media. Defaults to None. |
required |