Dash app integration with Jenkins

Hi everyone,

I have Dash application ready and running in my local system (127.0.0.1:8050). I want to know if it possible to deploy this application on Jenkins. My objective is to run the application in backgoround, where jenkins will give it input and app will show the results(plots) on a webpage.

thanks in advance

Hi amrinder777,

yeah i think that is possible. use flask in your dash app to listen on example http://uri/data.
Your jenkins build is gonna send json packages to /data and dash is working with it.

this might be a starting point

from flask import Flask, request
import json

server = Flask(__name__)
app = dash.Dash(__name__, server=server)

@server.route('/data', methods=['POST'])
    def req():
        print('REQ triggered')

        data = request.get_data()
        data = data.decode('utf8')
        data = json.loads(data)

Regards
stevie