Recent from talks
Nothing was collected or created yet.
IPython
View on Wikipedia
IPython Shell | |
| Original author | Fernando Perez[1] |
|---|---|
| Developers | Brian E. Granger, Min Ragan-Kelley, Paul Ivanov, Thomas Kluyver, Matthias Bussonnier |
| Initial release | 2001[1] |
| Stable release | 9.5.0[2] |
| Repository | |
| Written in | Python, JavaScript, CSS, HTML |
| Operating system | Cross-platform |
| Type | Shell |
| License | BSD |
| Website | ipython |
IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history. IPython provides the following features:
- Interactive shells (terminal and Qt-based).
- A browser-based notebook interface with support for code, text, mathematical expressions, inline plots and other media.
- Support for interactive data visualization and use of GUI toolkits.
- Flexible, embeddable interpreters to load into one's own projects.
- Tools for parallel computing.
IPython is a NumFOCUS fiscally sponsored project.[3]
Parallel computing
[edit]
IPython is based on an architecture that provides parallel and distributed computing. IPython enables parallel applications to be developed, executed, debugged and monitored interactively, hence the I (Interactive) in IPython.[4] This architecture abstracts out parallelism, enabling IPython to support many different styles of parallelism[5] including:
- Single program, multiple data (SPMD) parallelism
- Multiple program, multiple data (MPMD) parallelism
- Message passing using MPI
- Task parallelism
- Data parallelism
- Combinations of these approaches
- Custom user defined approaches
With the release of IPython 4.0, the parallel computing capabilities were made optional and released under the ipyparallel python package. And most of the capabilities of ipyparallel are now covered by more mature libraries like Dask.
IPython frequently draws from SciPy stack[6] libraries like NumPy and SciPy, often installed alongside one of many Scientific Python distributions.[6] IPython provides integration with some libraries of the SciPy stack, notably matplotlib, producing inline graphs when used with the Jupyter notebook. Python libraries can implement IPython specific hooks to customize rich object display. SymPy for example implements rendering of mathematical expressions as rendered LaTeX when used within IPython context, and Pandas dataframe use an HTML representation.[7]
Other features
[edit]IPython allows non-blocking interaction with Tkinter, PyGTK, PyQt/PySide and wxPython (the standard Python shell only allows interaction with Tkinter). IPython can interactively manage parallel computing clusters using asynchronous status callbacks and/or MPI. IPython can also be used as a system shell replacement.[8] Its default behavior is largely similar to Unix shells, but it allows customization and the flexibility of executing code in a live Python environment.
End of Python 2 support
[edit]IPython 5.x (Long Time Support) series is the last version of IPython to support Python 2. The IPython project pledged to not support Python 2 beyond 2020[9] by being one of the first projects to join the Python 3 Statement, the 6.x series is only compatible with Python 3 and above. It is still possible though to run an IPython kernel and a Jupyter Notebook server on different Python versions allowing users to still access Python 2 on newer version of Jupyter.
Project Jupyter
[edit]This section may rely excessively on sources too closely associated with the subject, potentially preventing the article from being verifiable and neutral. (October 2016) |

In 2014, IPython creator Fernando Pérez announced a spin-off project from IPython called Project Jupyter.[10] IPython continued to exist as a Python shell and kernel for Jupyter, but the notebook interface and other language-agnostic parts of IPython were moved under the Jupyter name.[11][12] Jupyter is language agnostic and its name is a reference to core programming languages supported by Jupyter, which are Julia, Python, and R.[13]
Jupyter Notebook (formerly IPython Notebook) is a web-based interactive computational environment for creating, executing, and visualizing Jupyter notebooks. It is similar to the notebook interface of other programs such as Maple, Mathematica, and SageMath, a computational interface style that originated with Mathematica in the 1980s.[14] It supports execution environments (aka kernels) in dozens of languages. By default Jupyter Notebook ships with the IPython kernel, but there are over 100 Jupyter kernels as of May 2018.
In the media
[edit]IPython has been mentioned in the popular computing press and other popular media,[15][14] and it has a presence at scientific conferences.[16] For scientific and engineering work, it is often presented as a companion tool to matplotlib.[17]
Grants and awards
[edit]Beginning 1 January 2013, the Alfred P. Sloan Foundation announced that it would support IPython development for two years.[18]
On 23 March 2013, Fernando Perez was awarded the Free Software Foundation Advancement of Free Software award for IPython.
In August 2013, Microsoft made a donation of $100,000 to sponsor IPython's continued development.[19]
In January 2014, it won the Jolt Productivity Award[20] from Dr. Dobb's in the category of coding tools. In July 2015, the project won a funding of $6 million from Gordon and Betty Moore Foundation, Alfred P. Sloan Foundation and Leona M. and Harry B. Helmsley Charitable Trust.[21]
In May 2018, it was awarded the 2017 ACM Software System Award.[22] It is the largest team to have won the award.[23]
See also
[edit]References
[edit]- ^ a b "The IPython notebook: a historical retrospective". Fernando Perez Blog. 8 January 2012.
- ^ "ipython 9.5.0". 29 August 2025. Retrieved 26 September 2025.
- ^ "NumFOCUS Sponsored Projects". NumFOCUS. Retrieved 25 October 2021.
- ^ Helen, Shen (2014). "Interactive notebooks: Sharing the code". Nature. 515 (7525): 151–152. Bibcode:2014Natur.515..151S. doi:10.1038/515151a. PMID 25373681.
- ^ "Using IPython for Parallel computing - IPython docs".
- ^ a b "SciPy Stack".
- ^ "Printing — SymPy 1.1 documentation". docs.sympy.org. Retrieved 11 April 2018.
- ^ McKinney, Wes (2012). "Chapter 3". Python for Data Analysis. ISBN 978-1-449-31979-3.
- ^ "Release of IPython 5.0 – Jupyter Blog". Jupyter Blog. 8 July 2016. Retrieved 11 April 2018.
- ^ "Project Jupyter // Speaker Deck".
- ^ "The Notebook, Qt console and a number of other pieces are now parts of Jupyter". GitHub. 17 October 2021.
- ^ "The Big Split™". 28 August 2017.
- ^ "Jupyter Logo · jupyter/Design Wiki". GitHub.
- ^ a b Somers, James. "The Scientific Paper Is Obsolete". The Atlantic. Retrieved 10 April 2018.
- ^ Koziol, Conrad (12 September 2005). "Introducing IPython". NewsForge. Archived from the original on 7 June 2012. Retrieved 14 June 2012.
- ^ "IPython Presentations".
- ^ Pérez, Fernando; Granger, Brian E. (2007). "IPython: A System for Interactive Scientific Computing" (PDF). Computing in Science & Engineering. 9 (3): 21–29. Bibcode:2007CSE.....9c..21P. doi:10.1109/MCSE.2007.53. S2CID 16637923. Archived from the original (PDF) on 2 June 2010. Retrieved 30 July 2015.
- ^ "Announcement in scipy mailing list". Archived from the original on 5 March 2016. Retrieved 12 December 2012.
- ^ "IPython Announcement".
- ^ "Jolt Productivity Award write-up in Dr. Dobb's".
- ^ "$6M for UC Berkeley and Cal Poly to expand and enhance open-source software for scientific computing and data science". Retrieved 13 August 2015.
- ^ "Recent Software System Award News".
- ^ "Jupyter receives the ACM Software System Award".
External links
[edit]IPython
View on GrokipediaOverview
Definition and Purpose
IPython is an enhanced interactive command shell and computing environment designed primarily for the Python programming language, with extensible support for other languages through kernel mechanisms, focusing on facilitating exploratory and interactive workflows. It extends the capabilities of the standard Python REPL by providing a robust platform for executing code in real-time, inspecting variables, and integrating computational results seamlessly into sessions. This design emphasizes user productivity in dynamic, iterative tasks rather than linear scripting.[7] Initiated in 2001 by Fernando Pérez, a graduate student at the University of Colorado, Boulder, IPython emerged as a response to the shortcomings of the vanilla Python interactive shell, which lacked sufficient features for demanding scientific computing applications, such as advanced code introspection, session history, and system integration.[3][7] Pérez developed it as a personal tool to streamline his physics research, merging enhancements with existing open-source projects to create a more capable interactive environment.[3] The core purpose of IPython is to enable comprehensive interactive and exploratory computing, supporting rapid prototyping of algorithms, in-depth data analysis, and instructional use in computational disciplines including science, engineering, and education. It caters to developers, researchers, and educators seeking an advanced interactive paradigm that goes beyond conventional batch processing or simple script execution.[8] IPython forms the foundational technology for Project Jupyter, extending its interactive model to a broader array of languages and applications.[3]Core Components
IPython's architecture is built around three primary components that facilitate interactive computing: the IPython shell, serving as an enhanced read-eval-print loop (REPL); the IPython kernel, acting as the execution backend; and various frontend interfaces, such as the terminal-based shell, Qt console, and integration with Jupyter notebooks.[9] The IPython shell provides a command-line interface for direct interaction, while the kernel operates as a separate process to execute code, manage the interactive namespace, and handle communication with frontends.[9] This decoupled design allows multiple frontends to connect to a single kernel, enabling flexible user experiences across different interfaces.[9] The kernel plays a central role in code execution by receiving requests from frontends, evaluating Python code in a controlled environment, maintaining the user's namespace for variables and objects, and returning results including outputs, errors, and execution status.[10] It communicates with frontends using the ZeroMQ messaging library, which employs a protocol based on ROUTER/DEALER and PUB/SUB socket patterns to handle asynchronous exchanges over multiple channels, such as the shell channel for execute requests and the IOPub channel for broadcasting outputs.[10] This setup ensures reliable, low-latency interaction, with messages serialized in JSON format and secured via HMAC signatures.[10] The components support multi-language execution through the extensible kernel architecture, where language-specific kernels can implement the same messaging protocol to handle code from beyond Python, such as Julia or R, often via integrations like those in the Jupyter ecosystem.[9] In this model, a frontend sends code execution requests to the kernel, which processes them in its native language environment, manages the corresponding namespace, and responds with results, thereby allowing seamless interactivity across languages without altering the core IPython structure.[10] This architecture promotes modularity, as depicted in a typical flow: the frontend initiates a request, the kernel executes and publishes outputs, and the frontend renders the response, supporting both local and remote connections.[9]History
Origins and Early Development
IPython originated in 2001 as a personal project by Fernando Pérez, then a graduate student pursuing a PhD in particle physics at the University of Colorado, Boulder.[3] Motivated by the limitations of Python's standard interactive interpreter for exploratory scientific computing, Pérez sought to create a more efficient tool for running small code chunks, inspecting data, and iterating on analyses during his research workflow.[11] This initial development addressed the need for enhanced interactivity in numerical simulations and data exploration, drawing from Pérez's experiences in physics where rapid prototyping was essential.[12] The project saw its first public release as IPython 0.1 in 2005, introducing key enhancements such as improved tab completion for code and commands, as well as better object introspection to display detailed information about variables and functions directly in the shell.[3] These features made IPython particularly appealing for interactive use, allowing users to query and examine objects without disrupting their workflow.[13] From the outset, IPython was distributed as open-source software under the revised BSD license, facilitating community contributions and adoption.[3] Early adoption occurred primarily within the scientific Python community, where IPython complemented emerging libraries like NumPy for array operations and SciPy for scientific algorithms, enabling more fluid integration in research pipelines.[3] By providing a robust interactive environment, it quickly became a staple for physicists, biologists, and other researchers using Python for data analysis and simulation, with integrations that leveraged these ecosystems for tasks like numerical computing and visualization.[14] Key early contributors included Brian Granger, who joined in 2004 to expand the project's capabilities in parallel computing, and Min Ragan-Kelley, who began contributing in 2006 on web-based interfaces and other enhancements.[15] Around 2008, these efforts coalesced into a more formalized IPython development team, with Pérez, Granger, and Ragan-Kelley leading collaborative advancements that solidified its role in interactive scientific workflows.[11]Key Releases and Transitions
IPython 1.0, released on August 8, 2013, marked a significant milestone after nearly twelve years of development, introducing robust notebook support alongside numerous enhancements to the interactive shell, such as improved tab completion and better integration with scientific computing libraries.[5] This version solidified IPython's role as a comprehensive environment for interactive Python computing, emphasizing stability and user productivity through refined architecture and documentation updates.[5] In 2014, the project transitioned from a standalone initiative to the core of Project Jupyter, a broader ecosystem aimed at language-agnostic interactive computing; this shift was formalized with the release of IPython 4.0 in August 2015, which decoupled the notebook server, Qt console, and other components into separate Jupyter subprojects, allowing IPython to focus solely on the Python kernel while promoting modularity and extensibility.[2] Concurrently, IPython adopted semantic versioning practices and centralized development on GitHub, facilitating collaborative contributions and consistent release cycles that enhanced maintainability.[16] IPython 6.0, released on April 19, 2017, dropped support for Python 2, requiring Python 3.3 or later. IPython 7.0, released on September 27, 2018, raised the minimum to Python 3.5 or later, while introducing native support for top-level async/await execution to streamline asynchronous programming workflows.[17][4] This release improved overall stability through architectural refinements and began emphasizing modern Python features, setting the stage for subsequent enhancements in error handling and performance. As of November 2025, the 9.x series serves as the current stable branch (latest version 9.7.0, released November 5, 2025), requiring Python 3.11 or higher and incorporating key enhancements such as integration with large language models (LLMs) for code completions, support for 256-color themes including Gruvbox Dark, improved magics like %autoreload and %timeit, initial compatibility with Python 3.14, and refined handling of safer sys.path configurations.[18][19] These updates, alongside security patches and type annotations for better compatibility with static analysis tools, have bolstered IPython's reliability and integration with contemporary Python ecosystems, including type hints and advanced debugging support.[18]Core Features
Interactive Shell Functionality
The IPython interactive shell enhances the standard Python REPL with several user-facing features designed to improve productivity during interactive coding sessions. Syntax highlighting colors code elements such as keywords, strings, and comments as they are typed, making the input more readable and reducing errors. Tab completion supports exploration of objects and methods by pressing the Tab key after typing an object name followed by a dot (e.g.,str.), displaying available attributes and methods; since version 6.0, it leverages the Jedi library for static type inference to provide more accurate suggestions, including for container elements like data[0].. Additionally, automatic parentheses matching detects incomplete expressions and prompts for continuation with new lines upon pressing Enter, preventing premature execution of partial code.[20]
History management in the IPython shell allows seamless recall and persistence of commands across sessions. Inputs and outputs are automatically stored in numbered lists accessible as In and Out variables, with up- and down-arrow keys enabling navigation through previous entries during a session. The %history magic command displays or searches the full command history, which is saved persistently in a SQLite database located by default at ~/.ipython/profile_default/history.sqlite for retrieval in future sessions. This feature is particularly useful in Jupyter notebooks, where users can recover previously executed code by running %history in a new notebook or terminal; however, it recovers only the executed input code, not unsaved edits or markdown cells. For longer-term storage, the %store magic command serializes and saves Python variables or outputs to disk, enabling their restoration via %store -r in subsequent sessions.[20][21]
Introspection tools facilitate quick examination of objects and namespaces without leaving the shell. The ? operator, appended to an object name (e.g., print?), displays its docstring and basic information, while ?? provides additional details, including the source code if available. The %who magic command lists all interactive variables in the current namespace, with options like %whos for a tabular summary including types and values, aiding in memory management and debugging.[20]
Shell access integrates system-level operations directly into the Python environment. The ! prefix executes operating system commands from within the shell (e.g., !ls -l), with output capturable in a list via assignment like files = !ls; Python variables can be interpolated using $ for dynamic commands (e.g., !echo $HOME). This functionality builds on Python's subprocess module, allowing seamless invocation of external processes while maintaining the interactive context.[20]
Magic Commands and Extensions
IPython provides a rich system of magic commands, which are special commands prefixed with% for line magics or %% for cell magics, enabling concise execution of common tasks directly within the interactive shell.[21] Line magics operate on a single input line following the command, making them suitable for quick operations like timing code execution, while cell magics apply to the entire cell, allowing multi-line content to be processed as a unit, such as writing output to files.[21] This distinction enhances workflow efficiency by tailoring commands to the scope of the task.
Among built-in magics, %timeit exemplifies line magics by benchmarking code performance through repeated executions and statistical analysis, such as %timeit sum(range(1000)), which reports average time over multiple loops.[21] For cell magics, %%writefile facilitates file input/output by saving the cell's contents to a specified file, as in %%writefile example.py followed by code lines, optionally appending with the -a flag to avoid overwriting.[21] Other notable built-ins include %matplotlib, a line magic that configures inline plotting for libraries like Matplotlib (e.g., %matplotlib inline embeds figures in the output), %pdb for toggling the Python debugger on errors (e.g., %pdb on), and %run to execute external Python scripts interactively (e.g., %run script.py), preserving variables in the current namespace.[21]
Users can extend IPython's functionality by creating custom magics via its API, registering functions as line, cell, or hybrid magics to suit specific needs like tailored data processing or performance analysis.[22] For instance, a standalone line magic for simple data loading might be defined using the @register_line_magic decorator:
from IPython.core.magic import register_line_magic
@register_line_magic
def load_data(line):
"Load data from a file path provided in the line."
import [pandas](/page/PANDAS) as pd
path = line.strip()
return pd.read_csv(path)
from IPython.core.magic import register_line_magic
@register_line_magic
def load_data(line):
"Load data from a file path provided in the line."
import [pandas](/page/PANDAS) as pd
path = line.strip()
return pd.read_csv(path)
load_data as %load_data, callable as %load_data file.csv to return a DataFrame.[22] For more complex, stateful magics like custom profiling, one can inherit from IPython.core.magic.Magics with the @magics_class decorator and register via an extension loader function, enabling access to the shell instance for deeper integration.[22]
Extensions further augment IPython by loading modular enhancements through the %load_ext magic, which imports and activates Python modules containing load_ipython_extension functions.[23] A prominent example is the built-in autoreload extension, loaded with %load_ext autoreload, which supports dynamic code reloading during development to reflect external edits without restarting the session.[24] Its modes, set via %autoreload, include mode 0 (disabled), mode 1 (reload explicit imports marked by %aimport), mode 2 (reload all modules except those excluded), and mode 3 (mode 2 plus new module objects), with %autoreload 2 being common for comprehensive updates in iterative workflows.[24]
Advanced Capabilities
Parallel Computing
IPython introduced its parallel computing framework in version 0.10, released in 2009, enabling distributed execution within interactive sessions through a client-server architecture.[25] The framework comprises controllers, which coordinate task distribution, engines that execute computations, and hubs that manage connections between clients and engines.[26] This setup allows users to leverage multiple processes or nodes for parallel workloads directly from an IPython shell. The framework supports both direct (blocking) and asynchronous (non-blocking) execution modes, facilitated by View objects that abstract interactions with the cluster.[27] In blocking mode, operations such asview.execute() wait for completion before returning control, suitable for sequential workflows, while non-blocking mode returns an AsyncResult object immediately, enabling continued interaction during computation.[28] View objects, including DirectView for targeted engine execution and LoadBalancedView for dynamic task assignment, simplify managing these modes across engines.
Load-balanced execution distributes independent tasks across available engines to optimize resource use, while broadcast execution applies operations uniformly to all engines.[29] For example, the @lview.parallel decorator from the ipyparallel client can parallelize a function over an iterable, splitting inputs and gathering results:
from ipyparallel import Client
rc = Client()
lview = rc.load_balanced_view()
@lview.parallel(block=True)
def square(x):
return x * x
results = lview.map(square, range(10))
from ipyparallel import Client
rc = Client()
lview = rc.load_balanced_view()
@lview.parallel(block=True)
def square(x):
return x * x
results = lview.map(square, range(10))
%px provide brief enhancements for quick parallel runs on selected engines.
For scalability, the framework integrates with clusters using MPI for high-performance interconnects or SSH for launching engines on remote hosts, supporting setups from multicore machines to distributed systems.[30] It includes fault tolerance mechanisms, such as automatic detection and handling of engine failures, allowing tasks to continue on surviving engines.[31] Post-2017 developments, including the separation into the standalone ipyparallel package, have emphasized compatibility with modern tools, with recommendations to favor Dask for large-scale, task-based parallelism where IPython's model may limit scaling beyond hundreds of engines.[32]
Integration with Other Tools
IPython supports embeddability through itsembed() function, which allows developers to insert an interactive IPython shell directly into Python scripts or applications for on-the-fly debugging and exploration.[33] This feature is particularly useful in web development environments, such as embedding IPython within Django's management shell, where Django automatically detects and utilizes IPython if installed, enhancing the interactive shell with features like tab completion and history. For instance, running python manage.py shell in a Django project launches an IPython-enhanced console, enabling seamless interaction with models and ORM queries.
Integration with integrated development environments (IDEs) extends IPython's utility beyond the command line. Spyder, a scientific Python IDE, incorporates an IPython console by default, providing code completion, inline plotting, and variable exploration tailored for data analysis workflows.[34] In Visual Studio Code, the official Python extension leverages IPython for interactive windows and Jupyter notebook support, allowing users to execute code cells with rich outputs like plots and DataFrames directly in the editor. Similarly, PyCharm offers native IPython console support, including magic commands and variable inspection, configurable via project settings to enable enhanced interactivity over the standard Python REPL.[35] IPython also facilitates rich output in terminal-based environments through ANSI escape sequences, enabling colored syntax highlighting and formatted displays without requiring graphical interfaces.[33]
Within the broader Python ecosystem, IPython integrates smoothly with data manipulation and visualization libraries. It works seamlessly with pandas for handling DataFrames, where users can inspect and manipulate tabular data interactively; for example, loading a CSV into a DataFrame and exploring it via IPython's namespace.[36] The %matplotlib inline magic command embeds Matplotlib plots directly in the output, a common practice for visualizing pandas data without external viewers, ensuring plots appear inline during sessions. For debugging, ipdb serves as an IPython-enhanced drop-in replacement for the standard pdb module, offering tab completion, syntax highlighting, and postmortem analysis to streamline troubleshooting in complex scripts.[37]
As of 2025, IPython maintains strong compatibility with asynchronous programming tools, particularly asyncio, through its built-in autoawait mechanism introduced in version 7.0, which automatically awaits coroutines in the interactive shell without explicit syntax changes.[38] This enables efficient handling of concurrent I/O operations in modern applications. Additionally, IPython's kernel powers extensions in environments like JupyterLab, facilitating integration with web frameworks such as FastAPI or Flask for interactive development and testing of asynchronous endpoints.[39] These ties underscore IPython's role in bridging interactive computing with production-grade tools.
