Is it possible to use Prodigy by importing it or via an API?

Hi! The prodigy.serve function can be used to start a recipe script and the Prodigy server on a given host and port: https://prodi.gy/docs/api-components#serve I've posted about how it works under the hood in this thread. The app is a modern FastAPI app served by uvicorn, and the source of the app.py is shipped with Prodigy. So if you want something custom, you can also always implement your own server.

The recipes are just regular Python functions so there's no need to have "magical" methods like dbout. You can interact with the database programmatically (API docs here) and write your own logic, or call the db_out recipe (in prodigy.recipes.commands) as a regular function. You can also interact with the REST API if you want to.