Answering myself again (to put this in the record for the next person)...

This seems to work

from jupyterhub.app import JupyterHub
                hub = JupyterHub(parent=self)
                hub.load_config_file(hub.config_file)
                print("Config is " , hub.config)



On Friday, August 5, 2016 at 2:41:31 PM UTC-7, Ted Liefeld wrote:
>
> I have created a custom authenticator and I would like to paramaterize a 
> few bits of it but I am struggling to understand how to get a hold of the 
> populated ConfigManager instance from the Jupyterhub.
>
> I tried adding 
>      from notebook.services.config import ConfigManager
> and then 
>     cm = ConfigManager()
>     print("Config is " , cm.get("JupyterHub"))
>
> thinking this would get me the values for the "JupyterHub" section which I 
> know has entries that are being used.  This is always coming back empty 
> though.  I figure I need to get the populated instance from the JupyterHub 
> application but I can't quite figure out how to get my hands on it.
>
> I also looked at the OAuth authenticator 
> <https://github.com/jupyterhub/oauthenticator/blob/master/oauthenticator/oauth2.py>
>  
> thinking it did the same thing, but it only ever does things like this 
>     os.getenv('OAUTH_CALLBACK_URL', '')
> which is surprising since from the docs it looks like it puts params in 
> the file
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/fb94bae1-befb-47d8-80c6-7f973c2a49d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to