Skip to content

Instantly share code, notes, and snippets.

@T4rk1n

T4rk1n/app.py Secret

Created September 25, 2018 19:19
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save T4rk1n/604500e6ee2ed205fbe5f3e351455be2 to your computer and use it in GitHub Desktop.
Save T4rk1n/604500e6ee2ed205fbe5f3e351455be2 to your computer and use it in GitHub Desktop.
cx_Freeze dash app
import dash
import dash_html_components as html
import dash_core_components as dcc
app = dash.Dash(__name__)
server = app.server
app.layout = html.Div([
'Home'
])
if __name__ == '__main__':
app.run_server(host='0.0.0.0', port=8049)
dash
dash-core-components
dash-html-components==0.13.2
cx_Freeze
cx_Logging
waitress
from waitress import serve
from app import server
serve(server)
from setuptools import find_packages
from cx_Freeze import setup, Executable
options = {
'build_exe': {
'includes': [
'cx_Logging', 'idna',
],
'packages': [
'asyncio', 'flask', 'jinja2', 'dash', 'plotly', 'waitress'
],
'excludes': ['tkinter']
}
}
executables = [
Executable('server.py',
base='console',
targetName='halliburton_dash_rig.exe')
]
setup(
name='halliburton_dash_rig',
packages=find_packages(),
version='0.4.0',
description='rig',
executables=executables,
options=options
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment