That's great, thanks very much Min, looks like exactly what I'm aiming for!

Regards,

Chris

On Saturday, August 26, 2017 at 8:51:44 PM UTC-4, Min RK wrote:
>
> On Sat, Aug 26, 2017 at 5:31 PM, Christopher Brooks <[email protected] 
> <javascript:>> wrote:
>
> Hi,
>>
>> I'd like to add some features to the server by capturing code submissions 
>> and then doing things like reporting back code complexity, format, etc. I'm 
>> unclear whether I would do this with a server extension, or whether I would 
>> have to implement my own kernel, or something in between. The REST API for 
>> the server as well as what I can understand from the server extension docs 
>> make this look like the wrong place -- I don't want to add new API 
>> endpoints or, at least, I need to be able to capture the code as it's been 
>> pushed to the existing serve for running.
>>
>> The docs on messaging with ZeroMQ were good: 
>> http://jupyter-client.readthedocs.io/en/latest/messaging.html
>>
>> Following this, would an appropriate method be to implement or modify an 
>> existing kernel proxy? Or am I barking up the right tree?
>>
> If you are only interested in Python, I think that doing this as an 
> IPython extension is probably the simplest thing to do. It is not very easy 
> to intercept executions at the server level, but IPython has events and 
> things that should make it pretty simple.
>
> Here <https://nbviewer.jupyter.org/72b1a70fb675c7e0a4b9668f10d0dda7> is 
> an example of registering a post_run_cell hook to call a function on 
> every cell that is executed.
>
>
>> (And, if this is the right way to go, does this mean I'm actually looking 
>> to change the ipython kernel here? https://github.com/ipython/ipykernel )
>>
>> Finally, do things change with Jupyterlab (which I use every day, fwiw), 
>> or is the communication mechanism still the same?
>>
> Server and kernel communication is exactly the same with JupyterLab, so 
> anything you do there should be fine in either environment.
>
> -Min
>
>
>> Regards,
>>
>> Chris
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/97b9d82d-b684-44ed-a026-839e1306d2d7%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jupyter/97b9d82d-b684-44ed-a026-839e1306d2d7%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/36d9e98f-e55e-4db6-847c-31aa37872363%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to