Gregory Hunt
02/21/2024, 7:55 PMMarvin
02/21/2024, 7:56 PMpython
from prefect import get_client
async with get_client() as client:
flow_run = client.read_flow_run(flow_run_id)
print(f"Current state of the flow run: {flow_run.state}")
Unfortunately, the excerpt does not provide complete information about fetching the deployment version directly. However, the flow run object fetched through the client might contain information about its version or the version of the related deployment. You might want to explore the attributes of the flow run object or check other endpoints provided by the Prefect client that deal with metadata and versioning.
For more details, you can check the documentation on deployments and versioning.