Skip to content

Instantly share code, notes, and snippets.

@jburel
Last active June 22, 2020 07:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jburel/3068c253073da6df07381fec84f8a9ee to your computer and use it in GitHub Desktop.
Save jburel/3068c253073da6df07381fec84f8a9ee to your computer and use it in GitHub Desktop.
Pass parameters to notebook using URL

Connect to OMERO, passing parameters as URL query parameters

This notebook requires the parameters host, username, passwd

If you already have a notebook opened you can pass the parameters by adding this query string to the URL in your browser:

?host='HOST'&username='USERNAME'&passwd='PASSWD'

or

?host='HOST'&username='USERNAME'&passwd='PASSWD'&autorun=true

to automatically run the whole notebook.

HOST needs to have support for web-sockets see https://docs.openmicroscopy.org/omero/latest/sysadmins/websockets.html. e.g. wss://workshop.openmicroscopy.org https://mybinder.org/v2/gist/jburel/3068c253073da6df07381fec84f8a9ee/master?urlpath=notebooks%2Fexample.ipynb%3Fhost%3D'HOST'%26username%3D'USERNAME'%26passwd%3D'PASSWORD'%26autorun%3Dtrue

name: base
channels:
- defaults
- ome
dependencies:
- pip
- omero-py
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pip install jupyter-notebookparams==0.0.4
jupyter nbextension install --py jupyter_notebookparams --user
jupyter nbextension enable --py jupyter_notebookparams --user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment