# Delphin mkprof

**URL:** <https://delphinqa.ling.washington.edu/t/delphin-mkprof/329>\
**Category:** PyDelphin Tools\
**Created:** [July 26, 2019, 10:02pm UTC](https://delphinqa.ling.washington.edu/t/delphin-mkprof/329 "2019-07-26T22:02:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olzama](https://delphinqa.ling.washington.edu/user_avatar/delphinqa.ling.washington.edu/olzama/32/6_2.png) [@olzama](https://delphinqa.ling.washington.edu/u/olzama)\
**Post date:** [July 26, 2019, 10:02pm UTC](https://delphinqa.ling.washington.edu/t/delphin-mkprof/329/1 "2019-07-26T22:02:35Z")

</div>

I think I’ve asked this before but I cannot locate the answer anymore.

Is there a way to use delphin’s mkprof option via the API (in a python program), or is it only a command line option?

---

<div class="post-metadata">

**Author:** ![goodmami](https://delphinqa.ling.washington.edu/letter_avatar_proxy/v4/letter/g/b5e925/32.png) [@goodmami](https://delphinqa.ling.washington.edu/u/goodmami)\
**Post date:** [July 27, 2019, 1:12am UTC](https://delphinqa.ling.washington.edu/t/delphin-mkprof/329/2 "2019-07-27T01:12:54Z")

</div>

Yes, all the subcommands of the `delphin` command are available as API functions in `delphin.commands` (see the [API docs](https://pydelphin.readthedocs.io/en/latest/api/delphin.commands.html) and the [guide](https://pydelphin.readthedocs.io/en/latest/guides/commands.html); I’ve reviewed the docs recently but please file an issue if you find something inaccurate or outdated).

```python
>>> from delphin import commands
>>> commands.mkprof(
... 'my-copy',
... source='~/grammars/erg-trunk/tsdb/gold/csli',
... where='i-length < 12',
... full=True,
... gzip=True)
    9746 bytes	relations
   13974 bytes	item.gz
       0 bytes	analysis
     444 bytes	phenomenon.gz
       0 bytes	parameter
       0 bytes	set
    5789 bytes	item-phenomenon.gz
       0 bytes	item-set
    1410 bytes	run.gz
  175311 bytes	parse.gz
  224668 bytes	result.gz
       0 bytes	rule
       0 bytes	output
       0 bytes	edge
    8447 bytes	tree.gz
   55022 bytes	decision.gz
    2008 bytes	preference.gz
    4637 bytes	update.gz
       0 bytes	fold
       0 bytes	score

```
