Hi @rlskoeser,
Glad to hear stats
and progress
commands are being useful in your workflow!
Since these are just python functions, you can definitely import them just like any other function from prodigy package and call them from your code:
from prodigy.recipes.commands import progress, stats
output_progress = progress(["test"])
print(output) # [['Aug 2024', 6, 3, 6, 3]]
output_stats = stats(no_format=True)
Since it's not part of the official API, you'd have to look at the actual implementation to check the exact signature and/or potentially modify something like add a flag to disable stdout or something else.
You can consult the source of these commands in your Prodigy installation path (you can double check where that was by running prodigy stats
) and then prodigy/recipes/commands.py
Let me know if that doesn't do the job for you