Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions src/prefect/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,57 @@ async def aformat(self) -> str | float | int | dict[str, Any]:
def format(self) -> str | float | int | dict[str, Any]:
return json.dumps(self.data)

async def aupdate(
self,
artifact_id: UUID,
client: "PrefectClient | None" = None,
) -> None:
"""
Placeholder method for updating an artifact.

This method is not yet implemented and will raise NotImplementedError.
The implementation will allow updating artifacts mid-flow run.

Related issue: https://github.com/PrefectHQ/prefect/issues/10955

Arguments:
artifact_id: The ID of the artifact to update.
client: The PrefectClient

Raises:
NotImplementedError: This method is not yet implemented.
"""
raise NotImplementedError(
"Artifact update functionality is not yet implemented. "
"See https://github.com/PrefectHQ/prefect/issues/10955 for more information."
)

@async_dispatch(aupdate)
def update(
self,
artifact_id: UUID,
client: "PrefectClient | None" = None,
) -> None:
"""
Placeholder method for updating an artifact.

This method is not yet implemented and will raise NotImplementedError.
The implementation will allow updating artifacts mid-flow run.

Related issue: https://github.com/PrefectHQ/prefect/issues/10955

Arguments:
artifact_id: The ID of the artifact to update.
client: The PrefectClient

Raises:
NotImplementedError: This method is not yet implemented.
"""
raise NotImplementedError(
"Artifact update functionality is not yet implemented. "
"See https://github.com/PrefectHQ/prefect/issues/10955 for more information."
)


class LinkArtifact(Artifact):
link: str
Expand Down
Loading