the-littlest-jupyterhub
the-littlest-jupyterhub copied to clipboard
plugin for creating environmental variables
I would like a plugin function to create environmental variables.
Motivation is for https://github.com/dask/dask-labextension/issues/183 i.e. set
export DASK_DISTRIBUTED__DASHBOARD__LINK=/user/${JUPYTERHUB_USER}/proxy/8787/status
Proposed change
A function in https://github.com/jupyterhub/the-littlest-jupyterhub/blob/main/tljh/hooks.py called tljh_environmnetal_variables'
Alternative options
Maybe this can be done currently with https://github.com/jupyterhub/the-littlest-jupyterhub/blob/main/tljh/hooks.py#L69 but not sure how
os.environ["DASK_DISTRIBUTED__DASHBOARD__LINK"] = f"user/{os.getenv('JUPYTERHUB_USER')}/proxy/8787/status"
Not sure if it will persist though
Who would use this feature?
People who want to use the dask lab extension
(Optional): Suggest a solution
Some work here
https://github.com/jupyterhub/the-littlest-jupyterhub/pull/414/files
If that goes could make that conf file plugable?
Done via yaml in z2jh https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/customizing/user-environment.html#set-environment-variables