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

**URL:** <https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489>\
**Category:** Uncategorized\
**Tags:** usage, solved\
**Created:** [May 6, 2019, 7:42pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489 "2019-05-06T19:42:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ati](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@Ati](https://support.prodi.gy/u/Ati)\
**Post date:** [May 6, 2019, 7:42pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489/1 "2019-05-06T19:42:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 6, 2019, 7:57pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489/2 "2019-05-06T19:57:10Z")

</div>

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

```python
from prodigy. __main__ import db_in, db_out

```

---

<div class="post-metadata">

**Author:** ![Ati](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@Ati](https://support.prodi.gy/u/Ati)\
**Post date:** [May 6, 2019, 8:23pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489/3 "2019-05-06T20:23:03Z")

</div>

Thanks Ines. Works perfectly 🙂

---

<div class="post-metadata">

**Author:** ![LBoss](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/lboss/32/1987_2.png) [@LBoss](https://support.prodi.gy/u/LBoss)\
**Post date:** [October 14, 2020, 2:33pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489/4 "2020-10-14T14:33:15Z")

</div>

Is this supposed to still work? Because I get

> ImportError: cannot import name 'db\_out' from 'prodigy.\_\_main\_\_'

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [October 14, 2020, 2:47pm UTC](https://support.prodi.gy/t/use-prodigy-serve-for-db-out-and-db-in/1489/5 "2020-10-14T14:47:11Z")

</div>

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.)
