From 45fcdc75c051616ec9424c23de74fa9a43b0ce68 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 31 Mar 2016 23:38:13 -0700 Subject: [PATCH] Add docs about callables in environment configurable --- jupyterhub/spawner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py index a02e4fb8..07f59c93 100644 --- a/jupyterhub/spawner.py +++ b/jupyterhub/spawner.py @@ -123,7 +123,13 @@ class Spawner(LoggingConfigurable): """) environment = Dict( - help="Environment variables to load for the Spawner." + help="""Environment variables to load for the Spawner. + + Value could be a string or a callable. If it is a callable, it will + be called with one parameter, which will be the instance of the spawner + in use. It should quickly (without doing much blocking operations) return + a string that will be used as the value for the environment variable. + """ ).tag(config=True) cmd = Command(['jupyterhub-singleuser'],