pipescript
pipescript is an IPython extension that brings a pipe operator (|>) and
powerful placeholder and macro-expansion syntax to IPython and Jupyter. If you
have used the magrittr package for R, you
will feel right at home.
Here is the smallest interesting program. Load the extension, then pipe a value through a couple of functions:
%load_ext pipescript
tup = (3, 4, 1, 5, 6)
tup |> sorted |> tuple # -> (1, 3, 4, 5, 6)
The pipe operator makes the flow of execution follow the natural left-to-right
order in which you read and write code, and – because each stage is just a
Python expression – you can build a pipeline incrementally, inspecting the
result after every |> you append.
Note
pipescript is aimed at interactive, scratchpad-style work in IPython and Jupyter. It is not (yet) a general-purpose functional language on top of Python, and is explicitly not intended for production use. See How it works for what that means in practice.
✨ You can also try pipescript in your browser ✨ – no install required.
Where to go from here
This documentation is organized in four tracks, following the Diátaxis framework:
Getting started – install pipescript and run your first pipeline.
Tutorials – learning-oriented, end-to-end builds you follow start to finish.
How-to guides – short, focused recipes for a specific task.
Concepts – the mental model: how the syntax works and why.
Reference – the precise catalog of every operator, macro, and helper.
If you are brand new, read Installation then Your first pipeline. If you want to understand why it works, start with How it works. If you are looking something up, jump to Operators or Macros and helpers.
Getting started
Tutorials
How-to guides
Concepts
More