SlideShare a Scribd company logo
1 of 19
Download to read offline
Building a custom
kernel for IPython
Hari Allamraju
anarahari@gmail.com
https://github.com/hari-allamraju
remitplan.com
rememberthebudget.in
What this talk is about
• What is an IPython kernel
• How does an IPython kernel work
• How can you build a simple wrapper kernel
• Some pointers on how to build a full fledged native
kernel
Why build a kernel?
• IPython does a lot of neat magic which makes it
invaluable for Python development
• There are no such tools for other languages, or even
applications which could benefit from having a nice
interactive front end
• We are developers, we can build such tools and share
them
• It’s fun to take things apart and see how they work and
could be the first step to you contributing to IPython itself
IPython architecture
Distributed client and kernel components talking over zeromq; separation
of client and kernel means you can add any client to the same kernel
Notebook is just another client
This can be extended to any client in any language or
interface
The two types of kernels
Changes after the recent Jupyter project
IPython messaging
zeromq sockets; all clients connected to a kernel receive
all messages and share the kernel context
Messaging spec
• You can find more details here - https://ipython.org/ipython-
doc/dev/development/messaging.html
• 4 types of channels
• Shell: request reply channel where all execution happens
• IOPub: this is where the kernel broadcasts the side effects
of any request to all clients
• Stdin: this is where the kernel requests input from the clients
• Control: for shutdown, abort etc
{
# The message header contains a pair of unique identifiers for the
# originating session and the actual message id, in addition to the
# username for the process that generated the message. This is useful in
# collaborative settings where multiple users may be interacting with the
# same kernel simultaneously, so that frontends can label the various
# messages in a meaningful way.
'header' : {
'msg_id' : uuid,
'username' : str,
'session' : uuid,
# All recognized message type strings are listed below.
'msg_type' : str,
# the message protocol version
'version' : '5.0',
},
# In a chain of messages, the header from the parent is copied so that
# clients can track where messages come from.
'parent_header' : dict,
# Any metadata associated with the message.
'metadata' : dict,
# The actual content of the message must be a dict, whose structure
# depends on the message type.
'content' : dict,
}
Full native kernel
• You have to handle all the zeromq sockets and
communication mechanism
• You have to ensure that the IPython messages are
created and parsed correctly for each type of request -
if you don’t implement something then you need to
handle that gracefully
• You have the freedom to structure your code as you
see fit
• https://github.com/dsblank/simple_kernel
Wrapper kernels
• Use IPython machinery to start the kernel and the
various zeromq channels which will be used to
communicate with the clients
• Provide the ability to create and parse the messages
as per the IPython messaging spec
• Give you specific end points or methods to implement
without having to worry about how it will all fit together
• https://github.com/takluyver/bash_kernel
Our focus - Wrapper
kernels
The base class
• from IPython.kernel.zmq.kernelbase import Kernel
• Available from IPython 3
• Provides you all the scaffolding needed to build the
kernel
The main properties
implementation
implementation_version
language
language_version
banner
Information for Kernel info replies. ‘Implementation’ refers to the kernel (e.g. IPython), and ‘language’ refers to the language it
interprets (e.g. Python). The ‘banner’ is displayed to the user in console UIs before the first prompt. All of these values are strings.
language_info
Language information for Kernel info replies, in a dictionary. This should contain the key mimetype with the mimetype of code in the
target language (e.g. 'text/x-python'), and file_extension (e.g. 'py'). It may also contain keys codemirror_mode and pygments_lexer
if they need to differ from language.
Other keys may be added to this later.
https://ipython.org/ipython-doc/dev/development/messaging.html#msging-kernel-info
The main method
do_execute(code, silent, store_history=True, user_expressions=None, allow_stdin=False)
Execute user code.
Parameters:
code (str) – The code to be executed.
silent (bool) – Whether to display output.
store_history (bool) – Whether to record this code in history and increase the execution count. If silent is True, this is
implicitly False.
user_expressions (dict) – Mapping of names to expressions to evaluate after the code has run. You can ignore this if you
need to.
allow_stdin (bool) – Whether the frontend can provide input on request (e.g. for Python’s raw_input()).
Your method should return a dict containing the fields described in Execution results. To display output, it can send
messages using send_response(). See Messaging in IPython for details of the different message types.
Launching the kernel
if __name__ == '__main__':
from IPython.kernel.zmq.kernelapp import IPKernelApp
IPKernelApp.launch_instance(kernel_class=MyKernel)
Let’s see some code!
• Some simple examples - echo and nodejs (with
pexpect)
• https://github.com/supercoderz/redis_kernel
• This is a wrapper kernel, connects to redis and
executes redis commands
• Almost complete in terms of functionality
Let’s see some code!
• Code overview of redis kernel
• More methods - https://ipython.org/ipython-doc/
dev/development/wrapperkernels.html
• This might change with Jupyter, still have to test
redis_kernel with Jupyter
Thank you!
Any questions?
Or you can reach me at anarahari@gmail.com

More Related Content

What's hot

Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.
Graham Dumpleton
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
Kiran Vadakkath
 

What's hot (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 
Introduction Jupyter Notebook
Introduction Jupyter NotebookIntroduction Jupyter Notebook
Introduction Jupyter Notebook
 
Getting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeGetting started with Linux and Python by Caffe
Getting started with Linux and Python by Caffe
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
First python project
First python projectFirst python project
First python project
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the Style
 
Python Summer Internship
Python Summer InternshipPython Summer Internship
Python Summer Internship
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 course
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python
PythonPython
Python
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
A quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for researchA quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for research
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 

Viewers also liked (7)

IPython & Jupyter
IPython & JupyterIPython & Jupyter
IPython & Jupyter
 
JupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science CollaborationJupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science Collaboration
 
IPython Notebook as a Unified Data Science Interface for Hadoop
IPython Notebook as a Unified Data Science Interface for HadoopIPython Notebook as a Unified Data Science Interface for Hadoop
IPython Notebook as a Unified Data Science Interface for Hadoop
 
IPython
IPythonIPython
IPython
 
Scala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVMScala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVM
 
Cooperative Data Exploration with iPython Notebook
Cooperative Data Exploration with iPython NotebookCooperative Data Exploration with iPython Notebook
Cooperative Data Exploration with iPython Notebook
 
Using IPython to Find Correlation
Using IPython to Find CorrelationUsing IPython to Find Correlation
Using IPython to Find Correlation
 

Similar to Building custom kernels for IPython

Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
Kanchilug
 

Similar to Building custom kernels for IPython (20)

Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Class_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdfClass_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdf
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Module1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxModule1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptx
 
PHYTON-REPORT.pdf
PHYTON-REPORT.pdfPHYTON-REPORT.pdf
PHYTON-REPORT.pdf
 
Socket programming-in-python
Socket programming-in-pythonSocket programming-in-python
Socket programming-in-python
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Python programming
Python programmingPython programming
Python programming
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
kecs105.pdf
kecs105.pdfkecs105.pdf
kecs105.pdf
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 
Report om 3
Report om 3Report om 3
Report om 3
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Building custom kernels for IPython

  • 1. Building a custom kernel for IPython Hari Allamraju anarahari@gmail.com https://github.com/hari-allamraju remitplan.com rememberthebudget.in
  • 2. What this talk is about • What is an IPython kernel • How does an IPython kernel work • How can you build a simple wrapper kernel • Some pointers on how to build a full fledged native kernel
  • 3. Why build a kernel? • IPython does a lot of neat magic which makes it invaluable for Python development • There are no such tools for other languages, or even applications which could benefit from having a nice interactive front end • We are developers, we can build such tools and share them • It’s fun to take things apart and see how they work and could be the first step to you contributing to IPython itself
  • 4. IPython architecture Distributed client and kernel components talking over zeromq; separation of client and kernel means you can add any client to the same kernel
  • 5. Notebook is just another client This can be extended to any client in any language or interface
  • 6. The two types of kernels Changes after the recent Jupyter project
  • 7. IPython messaging zeromq sockets; all clients connected to a kernel receive all messages and share the kernel context
  • 8. Messaging spec • You can find more details here - https://ipython.org/ipython- doc/dev/development/messaging.html • 4 types of channels • Shell: request reply channel where all execution happens • IOPub: this is where the kernel broadcasts the side effects of any request to all clients • Stdin: this is where the kernel requests input from the clients • Control: for shutdown, abort etc
  • 9. { # The message header contains a pair of unique identifiers for the # originating session and the actual message id, in addition to the # username for the process that generated the message. This is useful in # collaborative settings where multiple users may be interacting with the # same kernel simultaneously, so that frontends can label the various # messages in a meaningful way. 'header' : { 'msg_id' : uuid, 'username' : str, 'session' : uuid, # All recognized message type strings are listed below. 'msg_type' : str, # the message protocol version 'version' : '5.0', }, # In a chain of messages, the header from the parent is copied so that # clients can track where messages come from. 'parent_header' : dict, # Any metadata associated with the message. 'metadata' : dict, # The actual content of the message must be a dict, whose structure # depends on the message type. 'content' : dict, }
  • 10. Full native kernel • You have to handle all the zeromq sockets and communication mechanism • You have to ensure that the IPython messages are created and parsed correctly for each type of request - if you don’t implement something then you need to handle that gracefully • You have the freedom to structure your code as you see fit • https://github.com/dsblank/simple_kernel
  • 11. Wrapper kernels • Use IPython machinery to start the kernel and the various zeromq channels which will be used to communicate with the clients • Provide the ability to create and parse the messages as per the IPython messaging spec • Give you specific end points or methods to implement without having to worry about how it will all fit together • https://github.com/takluyver/bash_kernel
  • 12. Our focus - Wrapper kernels
  • 13. The base class • from IPython.kernel.zmq.kernelbase import Kernel • Available from IPython 3 • Provides you all the scaffolding needed to build the kernel
  • 14. The main properties implementation implementation_version language language_version banner Information for Kernel info replies. ‘Implementation’ refers to the kernel (e.g. IPython), and ‘language’ refers to the language it interprets (e.g. Python). The ‘banner’ is displayed to the user in console UIs before the first prompt. All of these values are strings. language_info Language information for Kernel info replies, in a dictionary. This should contain the key mimetype with the mimetype of code in the target language (e.g. 'text/x-python'), and file_extension (e.g. 'py'). It may also contain keys codemirror_mode and pygments_lexer if they need to differ from language. Other keys may be added to this later. https://ipython.org/ipython-doc/dev/development/messaging.html#msging-kernel-info
  • 15. The main method do_execute(code, silent, store_history=True, user_expressions=None, allow_stdin=False) Execute user code. Parameters: code (str) – The code to be executed. silent (bool) – Whether to display output. store_history (bool) – Whether to record this code in history and increase the execution count. If silent is True, this is implicitly False. user_expressions (dict) – Mapping of names to expressions to evaluate after the code has run. You can ignore this if you need to. allow_stdin (bool) – Whether the frontend can provide input on request (e.g. for Python’s raw_input()). Your method should return a dict containing the fields described in Execution results. To display output, it can send messages using send_response(). See Messaging in IPython for details of the different message types.
  • 16. Launching the kernel if __name__ == '__main__': from IPython.kernel.zmq.kernelapp import IPKernelApp IPKernelApp.launch_instance(kernel_class=MyKernel)
  • 17. Let’s see some code! • Some simple examples - echo and nodejs (with pexpect) • https://github.com/supercoderz/redis_kernel • This is a wrapper kernel, connects to redis and executes redis commands • Almost complete in terms of functionality
  • 18. Let’s see some code! • Code overview of redis kernel • More methods - https://ipython.org/ipython-doc/ dev/development/wrapperkernels.html • This might change with Jupyter, still have to test redis_kernel with Jupyter
  • 19. Thank you! Any questions? Or you can reach me at anarahari@gmail.com