use prodigy.serve() for db-out and db-in

Hello Prodigy team,

Is it possible to use prodigy.serve() for working with datasets? like db-out and db-in commands. If not, how can I call them inside a python script?

Thanks,
Ati

1 Like

Yes, those are just regular Python functions. You can import them like this and then call them with their respective arguments:

from prodigy.__main__ import db_in, db_out
1 Like

Thanks Ines. Works perfectly :slight_smile:

1 Like

Is this supposed to still work? Because I get

ImportError: cannot import name 'db_out' from 'prodigy.__main__'

Ah, that function now lives in prodigy.recipes.commands!

(You can also run prodigy stats to find the location of your Prodigy installation and then look at recipes/commands.py to see how it's implemented.)

2 Likes