Contribute Media
A thank you to everyone who has made this possible: Read More

IPython and Jupyter in Depth: High productivity, interactive Python

Description

Description

IPython and Jupyter provide tools for interactive computing that are widely used in scientific computing, education, and data science, but can benefit any Python developer.

You will learn how to use IPython in different ways, as:

  • an interactive shell,
  • a graphical console,
  • a network-aware VM (Virtual machine) in GUIs,
  • a web-based notebook combining code, graphics and rich HTML.

We will demonstrate how to deploy a custom environment with Docker that not only contains multiple Python kernels but also a couple of other languages.

Objectives

At the end of this tutorial, attendees will have an understanding of the overall design of Jupyter (and IPython) as a suite of applications they can use and combine in multiple ways in the course of their development work with Python and other programming languages. They will learn:

  • Tricks from the IPython machinery that are useful in everyday development,
  • What high-level applications in Jupyter, the web-based notebooks, can do and how these applications can be used.
  • How to use IPython and Jupyter together so that they can be best used for the problem at hand.

Python Level

Intermediate

Domain Level

Introductory

Detailed Abstract

IPython started in 2001 simply as a better interactive Python shell. Over the last decade it has grown into a powerful set of interlocking tools that maximize developer productivity in Python while working interactively.

Today, Jupyter consists of an IPython kernel that executes user code, provides many features for introspection and namespace manipulation, and tools to control this kernel either in-process or out-of-process thanks to a well specified communications protocol implemented over ZeroMQ. This architecture allows the core features to be accessed via a variety of clients, each providing unique functionality tuned to a specific use case:

  • An interactive, terminal-based shell with capabilities beyond the default Python interactive interpreter (this is the classic application opened by the ipython command that many users have worked with)

  • A web-based notebook that can execute code and also contain rich text and figures, mathematical equations and arbitrary HTML. This notebook presents a document-like view with cells where code is executed but that can be edited in-place, reordered, mixed with explanatory text and figures, etc. The notebook provides an interactive experience that combines live code and results with literate documentation and the rich media that modern browsers can display:

    Notebook screenshot

    Notebook screenshot

The notebooks also allow for code in multiple languages allowing to mix Python with Cython, C, R and other programming languages to access features hard to obain from Python.

These tools also increasingly work with languages other than Python, and we renamed the language independent frontend components to Jupyter in order to make this clearer. The Python kernel we provide and the original terminal-based shell will continue to be called IPython.

In this hands-on, in-depth tutorial, we will briefly describe IPython's architecture and will then show how to use the above tools for a highly productive workflow in Python.

The materials for this tutorial are available on a github repository.

Details

Improve this page