Hiya! I want to use prefect.runtime to get the tag...
# ask-community
p
Hiya! I want to use prefect.runtime to get the tags on a deployment - is it possible to do this? I see the prefect.runtime.deployment doesnt have a tag variable and the task_run and flow_run dont seem to have the deployment tags pulled through. Any help on how to get the deployment tags pulled out would be fab!!
c
I think you're looking for something like these: https://github.com/PrefectHQ/prefect/blob/f195e459089d9e596d9bb10799273d5dc0ba3c1f/src/prefect/runtime/deployment.py#L129-L150 but instead of returning `deployment.name`/`deployment.version`, you want
deployment.tags
that
_get_deployment
is reaching out over the network via read_deployment which returns a
DeploymentResponse
which has tags on it