greetings all, I am trying to use reference workf...
# ask-the-community
n
greetings all, I am trying to use reference workflow/launchplan, wonder if it is possible to get the latest version automatically of the referenced lp
y
not directly - you just have to search for it.
it’s a worthy addition to the api though
n
thank you i managed to do it like this
Copy code
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config

# FlyteRemote object is the main entrypoint to API
remote = FlyteRemote(
    config=Config.for_endpoint(endpoint=endpoint),
    default_project=project_name,
    default_domain=domain,
)

wf = remote.fetch_workflow(name=wf_name)

latest_version = wf.id.version
but yes, it would be better if it is a built in feature