smacke/pipescript: Powerful pipeline syntax for IPython and Jupyter
github.com·1w·
Discuss: Hacker News
Rust Macros
Preview
Report Post

pipescript

Pipescript is an IPython extension that brings a pipe operator |> and powerful placeholder and macro expansion syntax extensions to IPython and Jupyter.

If you’re familiar with the magrittr package for R, then you’ll be right at home with pipescript.

Getting Started

Run the following in IPython or Jupyter to install pipescript and load the extension:

%pip install pipescript
%load_ext pipescript

The %load_ext pipescript invocation is what enables the new pipe syntax in your current session.

Features by Example

Let’s look at a few examples to give a flavor of what you can do with pipescript:

# Render a sorted version of a tuple
>>> tup = (3, 4, 1, 5, 6)
>>> tup |> sorted |> tuple
(1, 3, 4, 5, 6)

The abo…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help