Shelley Kim
10/19/2024, 10:33 AMMarvin
10/19/2024, 10:34 AMhttpx.UnsupportedProtocol: Request URL is missing an ‘http://’ or ‘https://’ protocolworker.serverApiConfig.apiUrlPREFECT_API_URLPREFECT_API_URLPREFECT_API_URL="<http://prefect-server>.<namespace>.svc.cluster.local"Shelley Kim
10/19/2024, 10:38 AMMarvin
10/19/2024, 10:38 AMPREFECT_API_KEYPREFECT_API_URLkubectl create secret generic prefect-api-key --namespace=<your-namespace> --from-literal=key=<your-prefect-cloud-api-key>values.yamlPREFECT_API_KEYShelley Kim
10/23/2024, 12:41 PMMarvin
10/23/2024, 12:42 PMpython
from prefect import get_client
from prefect.artifacts import Artifact
async def fetch_artifacts(flow_run_id):
    async with get_client() as client:
        # You can use the client to query artifacts
        # Make sure to specify the correct flow_run_id and retrieval method for artifacts
        result = await client.read_artifacts_for_flow_run(flow_run_id)
        return result
# Use asyncio to run the async function and fetch artifacts for the specific flow run
import asyncio
flow_run_id = "your_flow_run_id_here" # Replace with your actual flow_run_id
artifacts = asyncio.run(fetch_artifacts(flow_run_id))
print(artifacts)prefect artifact inspect <my_key>