docs/v3/api-ref/python/prefect-artifacts.mdx
prefect.artifactsInterface for creating and reading artifacts.
acreate_link_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L365" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate_link_artifact(link: str, link_text: str | None = None, key: str | None = None, description: str | None = None, client: 'PrefectClient | None' = None) -> UUID
Create a link artifact.
Args:
link: The link to create.link_text: The link text.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
create_link_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L399" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_link_artifact(link: str, link_text: str | None = None, key: str | None = None, description: str | None = None, client: 'PrefectClient | None' = None) -> UUID
Create a link artifact.
Args:
link: The link to create.link_text: The link text.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
acreate_markdown_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L449" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate_markdown_artifact(markdown: str, key: str | None = None, description: str | None = None) -> UUID
Create a markdown artifact.
Args:
markdown: The markdown to create.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
create_markdown_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L478" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_markdown_artifact(markdown: str, key: str | None = None, description: str | None = None) -> UUID
Create a markdown artifact.
Args:
markdown: The markdown to create.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
acreate_table_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L522" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate_table_artifact(table: dict[str, list[Any]] | list[dict[str, Any]] | list[list[Any]], key: str | None = None, description: str | None = None) -> UUID
Create a table artifact asynchronously.
Args:
table: The table to create.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
create_table_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L552" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_table_artifact(table: dict[str, list[Any]] | list[dict[str, Any]] | list[list[Any]], key: str | None = None, description: str | None = None) -> UUID
Create a table artifact.
Args:
table: The table to create.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
acreate_progress_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L597" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate_progress_artifact(progress: float, key: str | None = None, description: str | None = None) -> UUID
Create a progress artifact asynchronously.
Args:
progress: The percentage of progress represented by a float between 0 and 100.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
create_progress_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L627" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_progress_artifact(progress: float, key: str | None = None, description: str | None = None) -> UUID
Create a progress artifact.
Args:
progress: The percentage of progress represented by a float between 0 and 100.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
aupdate_progress_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L656" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aupdate_progress_artifact(artifact_id: UUID, progress: float, description: str | None = None, client: 'PrefectClient | None' = None) -> UUID
Update a progress artifact asynchronously.
Args:
artifact_id: The ID of the artifact to update.progress: The percentage of progress represented by a float between 0 and 100.description: A user-specified description of the artifact.Returns:
update_progress_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L698" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>update_progress_artifact(artifact_id: UUID, progress: float, description: str | None = None, client: 'PrefectClient | None' = None) -> UUID
Update a progress artifact.
Args:
artifact_id: The ID of the artifact to update.progress: The percentage of progress represented by a float between 0 and 100.description: A user-specified description of the artifact.Returns:
acreate_image_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L739" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate_image_artifact(image_url: str, key: str | None = None, description: str | None = None) -> UUID
Create an image artifact asynchronously.
Args:
image_url: The URL of the image to display.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
create_image_artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L769" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_image_artifact(image_url: str, key: str | None = None, description: str | None = None) -> UUID
Create an image artifact.
Args:
image_url: The URL of the image to display.key: A user-provided string identifier.
Required for the artifact to show in the Artifacts page in the UI.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.Returns:
Artifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L34" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>An artifact is a piece of data that is created by a flow or task run. https://docs.prefect.io/latest/develop/artifacts
Args:
type: A string identifying the type of artifact.key: A user-provided string identifier.
The key must only contain lowercase letters, numbers, and dashes.description: A user-specified description of the artifact.data: A JSON payload that allows for a result to be retrieved.Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
LinkArtifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L253" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L265" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L269" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
MarkdownArtifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L273" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L277" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L281" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
TableArtifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L285" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L306" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L310" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
ProgressArtifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L314" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L331" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> float
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L335" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> float
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
ImageArtifact <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L339" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>An artifact that will display an image from a publicly accessible URL in the UI.
Args:
image_url: The URL of the image to display.Methods:
acreate <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>acreate(self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
An async method to create an artifact.
Args:
client: The PrefectClientReturns:
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L350" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str
aformat <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aformat(self) -> str | float | int | dict[str, Any]
aget <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A async method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
aget_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L181" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>aget_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A async method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns:
create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create(self: Self, client: 'PrefectClient | None' = None) -> 'ArtifactResponse'
A method to create an artifact.
Args:
client: The PrefectClientReturns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L354" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str
This method is used to format the artifact data so it can be properly sent to the API when the .create() method is called.
Returns:
format <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format(self) -> str | float | int | dict[str, Any]
get <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get(cls, key: str | None = None, client: 'PrefectClient | None' = None) -> 'ArtifactResponse | None'
A method to get an artifact.
Args:
key: The key of the artifact to get.client: A client to use when calling the Prefect API.Returns:
get_or_create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/artifacts.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_or_create(cls, key: str | None = None, description: str | None = None, data: dict[str, Any] | Any | None = None, client: 'PrefectClient | None' = None, **kwargs: Any) -> tuple['ArtifactResponse', bool]
A method to get or create an artifact.
Args:
key: The key of the artifact to get or create.description: The description of the artifact to create.data: The data of the artifact to create.client: The PrefectClient**kwargs: Additional keyword arguments to use when creating the artifact.Returns: