# Termporary file usage in plugins

**URL:** https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342
**Category:** Developer Discussion
**Created:** [May 29, 2018, 1:58pm UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342 "2018-05-29T13:58:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![marchywka](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@marchywka](https://forum.qiime2.org/u/marchywka)
#### Post date: [May 29, 2018, 1:58pm UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342/1 "2018-05-29T13:58:33Z")

</div>

I have two plugin skeletons now but need to fix a lot of details. Right now they are implemented together as one plugin copied from the existing classifier and another  
cleaner one with no obvious leftover junk. The latter is the one I wanted to finish developing and it currently imports 2 shared objects that implement classification and visualization functions. They ignore the qiime2 input and output parameters  
and right now make use of files. For early testing, I wanted to just copy  
the qiime2 semantic types to files and then read those into my c++ code  
as this avoids dealing with the python interface and automtically creates debug  
information. However, I did want to put them some where suitable for others to  
play with should that seem reasonable.What should a plugin developer  
do for file usage? I did note you make a lot of use of /tmp which I guess  
is a good place but not sure how you generate the names etc.  
Another benefit of this may be memory conservation although I'm not  
sure I can free an input object after writing it to a temp file.

I just took the code and generated a bunch of svg files showing relaive fits  
between my candidates and those apparently from a qiime1 pipeline and  
digging into it now. While this is not using qiime2 right now, it is the same stuff  
I have called from my plugins.

Thanks.

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [May 29, 2018, 2:07pm UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342/2 "2018-05-29T14:07:40Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [May 31, 2018, 1:59am UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342/3 "2018-05-31T01:59:59Z")

</div>

Hey there @marchywka!

> [@marchywka](#):
>
> I have two plugin skeletons

Excellent! 🍾

> [@marchywka](#):
>
> What should a plugin developer  
> do for file usage?

I would suggest taking a read through the draft developer docs: [https://dev.qiime2.org](https://dev.qiime2.org). Most QIIME 2 concepts are described in detail there, as well as the overall architecture, which will help answer your question.

Hope that helps, and keep us posted! If you want someone to "kick the tires" on your plugins, just let us know! 🦖 :qiime2:

If you have any additional questions, please open up new topics. Thanks!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [May 31, 2018, 2:00am UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342/4 "2018-05-31T02:00:01Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [May 31, 2018, 2:00am UTC](https://forum.qiime2.org/t/termporary-file-usage-in-plugins/4342/5 "2018-05-31T02:00:35Z")

</div>


