prefect.cli.artifact
list_artifacts
list_artifacts(limit: int = typer.Option(100, '--limit', help='The maximum number of artifacts to return.'), all: bool = typer.Option(False, '--all', '-a', help='Whether or not to only return the latest version of each artifact.'))
inspect
inspect(key: str, limit: int = typer.Option(10, '--limit', help='The maximum number of artifacts to return.'), output: Optional[str] = typer.Option(None, '--output', '-o', help='Specify an output format. Currently supports: json'))
key
: the key of the artifact to inspect$ prefect artifact inspect "my-artifact"
[
{
'id': 'ba1d67be-0bd7-452e-8110-247fe5e6d8cc',
'created': '2023-03-21T21:40:09.895910+00:00',
'updated': '2023-03-21T21:40:09.895910+00:00',
'key': 'my-artifact',
'type': 'markdown',
'description': None,
'data': 'my markdown',
'metadata_': None,
'flow_run_id': '8dc54b6f-6e24-4586-a05c-e98c6490cb98',
'task_run_id': None
},
{
'id': '57f235b5-2576-45a5-bd93-c829c2900966',
'created': '2023-03-27T23:16:15.536434+00:00',
'updated': '2023-03-27T23:16:15.536434+00:00',
'key': 'my-artifact',
'type': 'markdown',
'description': 'my-artifact-description',
'data': 'my markdown',
'metadata_': None,
'flow_run_id': 'ffa91051-f249-48c1-ae0f-4754fcb7eb29',
'task_run_id': None
}
]
delete
delete(key: Optional[str] = typer.Argument(None, help='The key of the artifact to delete.'), artifact_id: Optional[UUID] = typer.Option(None, '--id', help='The ID of the artifact to delete.'))
key
: the key of the artifact to delete$ prefect artifact delete "my-artifact"