Querying for module information should be done using the MBS and/or Koji APIs.
Various code that I maintain (in OSBS, fedmod, and random tooling) wants to do module build lookups - different variations of "look up the modulemd for latest build of a NAME:STREAM[:VERSION]". Variations generally being exactly what "latest" means here.
Is a test tool that incorporates most of the capability that I needed across my uses. It's distinctly more than a couple of lines of code - I can cut-and-paste it for now, but what's the right long-term home? Is there a simpler way?
My best idea right now is that if the 'base_version' and'status' part of my code was simplified to simply be "tag" and avoid reliance on the tag structure of Fedora, then this might make a reasonable addition to the Koji CLI and API - there are some things that using raw tags for the query makes trickier, but it's probably workable.
Thanks for any input!
Owen