Attachments
PydanticPath
module-attribute
¶
An anyio.Path that pydantic can validate from and serialize to a plain
string, for use as a field type on pydantic models.
Attachment
pydantic-model
¶
Bases: Attachment
A file attached to a received or sent message.
Fields:
-
caption(str | None) -
content_type(str | None) -
remote_filename(str | None) -
height(int | None) -
local_filename(str | None) -
size(int | None) -
upload_timestamp(int | None) -
width(int | None) -
base64_content(str | None)
local_path
async
¶
local_path() -> Path | None
Resolve where this attachment is cached on disk, if it was downloaded.
Returns:
| Type | Description |
|---|---|
Path | None
|
The local path, or |