Skip to main content

linux pipe style port to python

code like this: pipe(1) | float | str | list | done !

Build Status tested on 2.7, 3.2, 3.3

Install

pip install pipeto

API

  • pipe(arg)
    generate a pipable object pipe to next function.
    @param : arg {mixed}
  • done(arg)
    get the actural value out of pipable object
  • compose(fn)
    Compose functions. Can be used as a decorator.
    @alias : composable
    @param : fn {callable}

example

from pipeto import *
import operator as op

inc = lambda x: x + 1
double = lambda x: x + x

# pipe
pipe(1) | float | str | list | done    # == ['1', '.', '0']
pipe(2) | inc | done                   # == 3
pipe(2) | inc | double | done          # == 6
pipe([1,2,3]) | sum | done             # == 6

# compose
newfn = compose(inc) | double
newfn(2) # == double(inc(2))

Metadata

Release files for pipeto 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipeto 0.2.1
File Size Uploaded Provenance
pipeto-0.2.1.tar.gz 2.3 kB Without provenance Details

Release files / pipeto-0.2.1.tar.gz

Download URL pipeto-0.2.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b5fcb914b8346dd0466d53c3def773a7483b39bc4faabd771c51d712c954b907
BLAKE2b-256 checksum
How to use checksums
d150235cd11653a5ed0dbae42a97d383e772ee1b87564db56da11dcbc058e2c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pipeto 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page