pipescript

Getting started

  • Installation
    • Supported environments
    • Trying it without installing
    • Working from a source checkout
    • Next steps
  • Your first pipeline
    • The pipe operator
    • Build it up incrementally
    • Passing extra arguments with $
    • Where to go next

Tutorials

  • Tutorial: the Collatz sequence
    • Branching with fork and collapse
    • unless and otherwise
    • The concise form
    • Iterating: .** and repeat / until
    • Where to go next
  • Tutorial: untangling nested calls
    • The starting point
    • Rewriting as a pipeline
    • Why this is nicer in a notebook
    • More examples

How-to guides

  • Use placeholders ($)
    • The basic idea
    • Each $ is a new argument
    • Named placeholders
    • Placeholders can appear anywhere
    • Related
  • Build partials and quick lambdas
    • Currying with a trailing $
    • Partial-call syntax ($)
    • Higher-order macros (reduce[...])
    • Quick lambdas with f[...]
    • Omitting f inside higher-order macros
    • Related
  • Write brace blocks and statement blocks
    • Multi-line statement blocks
    • Capturing $ into a local
    • Conditionals and nested pipelines
    • Brace bodies compose with every macro
    • Related
  • Use method macros
    • foreach
    • As a pipe stage
    • Under the hood
  • Define your own macros
    • With the macro DSL
    • With a custom node transformer
    • Namespace-block macros
    • Related
  • Use the other pipe operators
    • Assignment pipe (|>>)
    • Varargs pipe (*|>)
    • Function pipe (.>)
    • Backward pipes
    • Precedence
  • Optional chaining and nullish coalescing
    • Optional chaining (?.)
    • Nullish coalescing (??)
    • Permissive attribute access (.?)

Concepts

  • How it works
    • Two stages
    • The pyccolo backend
    • Consequences
    • A Python superset, deliberately scoped
  • Placeholder scope
    • The rules
    • Why it matters
    • Related
  • Undetermined pipelines and thunks
    • Undetermined pipelines
    • Thunks: the leading |>
    • Related
  • Performance

Reference

  • Operators
    • Forward pipe operators
    • Backward operators
    • Composition power (.**)
    • Precedence and associativity
  • Macros and helpers
    • Functional macros
    • Side-effect and flow helpers
    • Branching macros
    • Iteration macros
    • Concurrency
    • Defining your own
    • Other helpers
  • Command-line interface
  • API reference
    • Helper functions
      • collapse()
      • lshift()
      • null()
      • peek()
      • pop()
      • push()
      • replace()
      • rshift()
      • unnest()
      • context()
      • do()
      • expect()
      • fork()
      • future()
      • memoize()
      • ntimes()
      • once()
      • otherwise()
      • parallel()
      • read()
      • repeat()
      • unless()
      • until()
      • when()
      • write()
    • Registering namespace-block macros
      • register_namespace_macro()

More

  • Example gallery
  • History
    • 0.0.27 (2026-07-11)
    • 0.0.26 (2026-07-07)
    • 0.0.25 (2026-07-03)
    • 0.0.22 (2026-06-24)
    • 0.0.21 (2026-06-13)
    • 0.0.20 (2026-06-12)
    • 0.0.19 (2026-06-08)
    • 0.0.18 (2026-01-24)
    • 0.0.14 (2026-01-19)
    • 0.0.11 (2026-01-18)
    • 0.0.10 (2026-01-09)
    • 0.0.9 (2026-01-08)
    • 0.0.8 (2026-01-07)
    • 0.0.6 (2026-01-04)
    • 0.0.1 (2025-12-30)
pipescript
  • Index

Index

C | D | E | F | L | M | N | O | P | R | U | W

C

  • collapse() (in module pipescript.api.utils)
  • context() (in module pipescript.api.static_macros)

D

  • do() (in module pipescript.api.static_macros)

E

  • expect() (in module pipescript.api.static_macros)

F

  • fork() (in module pipescript.api.static_macros)
  • future() (in module pipescript.api.static_macros)

L

  • lshift() (in module pipescript.api.utils)

M

  • memoize() (in module pipescript.api.static_macros)
  • module
    • pipescript.api.static_macros
    • pipescript.api.utils

N

  • ntimes() (in module pipescript.api.static_macros)
  • null() (in module pipescript.api.utils)

O

  • once() (in module pipescript.api.static_macros)
  • otherwise() (in module pipescript.api.static_macros)

P

  • parallel() (in module pipescript.api.static_macros)
  • peek() (in module pipescript.api.utils)
  • pipescript.api.static_macros
    • module
  • pipescript.api.utils
    • module
  • pop() (in module pipescript.api.utils)
  • push() (in module pipescript.api.utils)

R

  • read() (in module pipescript.api.static_macros)
  • register_namespace_macro() (in module pipescript.tracers.macro_tracer)
  • repeat() (in module pipescript.api.static_macros)
  • replace() (in module pipescript.api.utils)
  • rshift() (in module pipescript.api.utils)

U

  • unless() (in module pipescript.api.static_macros)
  • unnest() (in module pipescript.api.utils)
  • until() (in module pipescript.api.static_macros)

W

  • when() (in module pipescript.api.static_macros)
  • write() (in module pipescript.api.static_macros)

© Copyright 2025, Stephen Macke.

Built with Sphinx using a theme provided by Read the Docs.