A minimal example server to run with jupyter-server-proxy
Project description
This is a demo package showing how to run a web app through Jupyter Server Proxy.
This mechanism allows a user to run a separate web app through JupyterHub. To try it, install this package into the same Python environment which is used to launch your single-user server:
pip install hello_jupyter_proxy
If your server is already running use the JupyterHub control panel (/hub/home) to stop and start it. You should have a new ‘hello’ option in the ‘New’ menu (classic notebook) or the launcher (Jupyterlab). You can also go directly to https://(your-jhub-server)/user-redirect/hello/ .
Building applications to proxy
This is meant as a starting point for building useful applications to run in Jupyter Server Proxy. See the JSP docs and especially the examples page for more information.
For real web applications in Python, you will want a web framework rather than the low-level http.server module. There are many choices, but Tornado (used by Jupyter) and Flask are two well known ones.
Security: Once user A launches your application through Jupyter, it is listening on a TCP port, and user B can also connect to it and send requests. You might want to consider:
Limiting what the application can do and what information it can retrieve, so accessing another user’s server is not too dangerous.
Listening only on localhost (as in this example), to limit access to only users who can log into the same machine.
Finding some way to verify that the user sending the request matches the user which the application is running as.
Which measures make sense will depend on your application and the environment in which you expect to use it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hello_jupyter_proxy-0.2.tar.gz
.
File metadata
- Download URL: hello_jupyter_proxy-0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98f488c1c9fca1344200dae77bed5d7cdcda141da422dbaccadd1708c1d0fef7 |
|
MD5 | ec1f7d6e3af8213309aab72d22ff1d68 |
|
BLAKE2b-256 | 08bf8fe7f271bf508a251e8505b591d97862d238b797a725d9b8ebb23072f153 |
File details
Details for the file hello_jupyter_proxy-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: hello_jupyter_proxy-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 159c1dedfd2f85f055201bcfcb58202eafe1854f54d5b392d7c6d529483a10b9 |
|
MD5 | f15d01f00ede7cec504cdf8e8489d4b5 |
|
BLAKE2b-256 | 4458e8c00342a5818a5ad5c9378557f744ec26b4f843c3681bdedc0cd8857926 |