Skip to content

Commit

Permalink
Merge pull request #237 from mattiatantardini/master
Browse files Browse the repository at this point in the history
Add streamlit example
  • Loading branch information
takluyver committed Nov 24, 2021
2 parents 37d9e30 + aa172fc commit f9f13b6
Show file tree
Hide file tree
Showing 7 changed files with 2,202 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/streamlit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Streamlit deployment via `pynsist`

This is an example on how to deploy a streamlit app using `pynsist`. The example also includes the required packages to run plotly inside the app.

The extra wheels of the package `blinker`is required (can't be found on Pypi).

[Here](https://stackoverflow.com/questions/69352179/package-streamlit-app-and-run-executable-on-windows/69621578#69621578) you can find additional information on why the `src/run_app.py` has the chosen structure.

The browser tab with the app should open automatically after a brief delay. This is done to avoid the tab opening while streamlit is still starting, so that this results in a `Cannot reach localhost:8501` error.


79 changes: 79 additions & 0 deletions examples/streamlit/installer.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[Application]
name=Windows Streamlit App
version=0.1.0
# How to lunch the app - this calls the 'main' function from the 'run_app' package:
entry_point=src.run_app:main
icon=resources/caritas-logo.ico

[Python]
version=3.8.10
bitness=64

[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
pypi_wheels = altair==4.1.0
astor==0.8.1
attrs==21.2.0
backcall==0.2.0
backports.zoneinfo==0.2.1
base58==2.1.0
bleach==4.1.0
blinker==1.4
cachetools==4.2.2
certifi==2021.5.30
cffi==1.14.6
charset-normalizer==2.0.6
click==7.1.2
decorator==5.1.0
defusedxml==0.7.1
distlib==0.3.3
entrypoints==0.3
idna==3.2
jsonschema==3.2.0
mistune==0.8.4
mypy-extensions==0.4.3
numpy==1.21.1
packaging==21.0
pandas==1.3.3
pandocfilters==1.5.0
parso==0.8.2
pillow==8.3.2
platformdirs==2.4.0
prompt-toolkit==3.0.20
protobuf==3.18.0
pyarrow==5.0.0
pycparser==2.20
pydeck==0.7.0
pyparsing==2.4.7
pyrsistent==0.18.0
python-dateutil==2.8.2
pytz==2021.1
requests==2.26.0
requests-download==0.1.2
send2trash==1.8.0
setuptools==57.0.0
six==1.14.0
smmap==4.0.0
streamlit==1.0.0
terminado==0.12.1
testpath==0.5.0
toml==0.10.2
tomli==1.2.1
toolz==0.11.1
tornado==6.1
traitlets==5.1.0
typing-extensions==3.10.0.2
tzlocal==3.0
urllib3==1.26.7
validators==0.18.2
# panda dependencies
Jinja2==3.0.1
# Jinja2 dependencies
MarkupSafe==2.0.1
# Plotly and its dependencies
plotly==5.3.1
tenacity==8.0.1

extra_wheel_sources = ./wheels

0 comments on commit f9f13b6

Please sign in to comment.