# Integrating dash in cherrypy

**URL:** <https://community.plotly.com/t/integrating-dash-in-cherrypy/37950>\
**Category:** Dash Python\
**Created:** [April 17, 2020, 11:47am UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950 "2020-04-17T11:47:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablomarina](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@pablomarina](https://community.plotly.com/u/pablomarina)\
**Post date:** [April 17, 2020, 11:47am UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/1 "2020-04-17T11:47:02Z")

</div>

Hello:

Is there anyway to integrate a Dash app using cherrypy instead of Flask?

Here is my code:

```auto
import dash
import cherrypy
import dash_core_components as dcc
import dash_html_components as html

external_stylesheets=['https://codepen.io/chriddyp/pen/bWLwgP.css']
appl= dash.Dash( __name__ , external_stylesheets=external_stylesheets)

appl.layout=...

class Root(object):

    def index(self):
        output='''
        "Access the <a href="dash">application</a>"
        '''
        return output
    index.exposed=True

    def dash(self):
        return appl
    
    dash.exposed=True
    

if __name__ == ' __main__':  
    configfile=os.path.join(os.path.dirname( __file__ ), 'server.conf')
    cherrypy.quickstart(Root(), script_name='/', config=configfile)

```

I get the error:  
TypeError: ‘Dash’ object is not iterable

I think I’m very close, but I have the feeling that there is one missing piece

Thank you!

---

<div class="post-metadata">

**Author:** ![vcmorini](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vcmorini](https://community.plotly.com/u/vcmorini)\
**Post date:** [June 9, 2020, 1:02pm UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/2 "2020-06-09T13:02:18Z")

</div>

Hi @pablomarina, maybe you mean how to use cherrypy wsgi/[cheroot](https://cheroot.cherrypy.org/en/latest/pkg/cheroot.wsgi.html) with Dash?

For more info, you can check this out: [DASH Deployment: HELP!](https://community.plotly.com/t/dash-deployment-help/34094/5)

---

<div class="post-metadata">

**Author:** ![pablomarina](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@pablomarina](https://community.plotly.com/u/pablomarina)\
**Post date:** [June 9, 2020, 6:02pm UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/3 "2020-06-09T18:02:55Z")

</div>

Yeah, it was that. Fortunately I finally worked it out during this time.

Thanks for replying anyway.

---

<div class="post-metadata">

**Author:** ![maulberto3](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@maulberto3](https://community.plotly.com/u/maulberto3)\
**Post date:** [July 3, 2020, 8:09pm UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/4 "2020-07-03T20:09:43Z")

</div>

@pablomarina Can you explain what got it working?

---

<div class="post-metadata">

**Author:** ![pablomarina](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@pablomarina](https://community.plotly.com/u/pablomarina)\
**Post date:** [July 4, 2020, 12:09am UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/5 "2020-07-04T00:09:31Z")

</div>

Just using Cheroot function, specifying IP direction or hostname, port number and number of threads. No need to use Cherrypy framework, could be another one (e.g. flask)

 ![C0AC4D8908104219861FAA76B5DACBB7.png](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/6/677f06bdf711468707faf594c72c7993f90d2513.png)

---

<div class="post-metadata">

**Author:** ![maulberto3](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@maulberto3](https://community.plotly.com/u/maulberto3)\
**Post date:** [July 7, 2020, 4:46am UTC](https://community.plotly.com/t/integrating-dash-in-cherrypy/37950/6 "2020-07-07T04:46:00Z")

</div>

@pablomarina Hi just did, works well, although no reload function when developing.
