跳到主要内容
版本:0.2.0

DownloaderStatus

类型源码

DownloaderStatus(
type: "success" | "error-connect" | "error-config" | "error-io" | "error-unknown",
http_code: int
)

DownloaderStatusTypedDict

DownloaderStatusDownloader(status=...)的属性类型。其定义了下载事件结束时设置的状态码。

若同一下载器触发了多次下载事件,后触发的事件将会覆写先触发的事件设置的状态。

别名

该类型可以按以下方式之一获取

import dash_file_cache as dfc


dfc.DownloaderStatus
dfc.components.DownloaderStatus
dfc.components.typehints.DownloaderStatus

关键字

关键字类型
说明
type"success" | "error-connect" | "error-config" | "error-io" | "error-unknown"事件的状态码。若下载事件成功,则下载事件结束时、该值当设为"success"
http_codeint响应的HTTP状态码。若下载事件成功,则该值应当处于200-299的范围内。