Since the kernel is a different process from the server, objects in the
server are not available to the kernels. Environment variables can be used
to share little bits of information throughout the server and kernels, e.g.

export MY_USERNAME='something'
jupyter notebook

in which case the MY_USERNAME env will be available to the server and all
of its kernel subprocesses. If the server doesn’t know its name until some
time later, you can modify how kernels are started, to pass this
environment variable on each kernel launch.

-MinRK
​

On Tue, Aug 9, 2016 at 2:19 PM, Paul A <[email protected]> wrote:

> Hi all, I have a user id passed via HttpContext, so in principle the
> notebook should know who is connecting. I know this is not secure, but
> should work for "Hey {}".format(context['username'].
>
> How can I get access to that HttpContext instance?
>
> --
> 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/45b3039b-41d8-464c-a041-81a108fc8450%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/45b3039b-41d8-464c-a041-81a108fc8450%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHNn8BUHoxoJ3VP3hB%3DiqJF3Yb17nBB%2B%3DvvUGUq-WBH3pZG8Ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to