iifunc
Build a pipeline out of plain functions, without a class or a framework.
Install
pip install iifunc
Usage
from iifunc import compose, pipe
def double(x): return x * 2
def bump(x): return x + 1
pipe(double, bump)(3) # bump(double(3)) == 7
compose(double, bump)(3) # double(bump(3)) == 8
clean = pipe(str.strip, str.lower)
clean(" ABC ") # 'abc'
identity = pipe() # no functions -> identity
identity(5) # 5
Direction
| Helper | Reading order | f, g applied to x |
|---|---|---|
pipe |
left to right | g(f(x)) |
compose |
right to left | f(g(x)) |
Both only receive extra positional or keyword arguments on the first function called. Later stages take exactly one value, which is what keeps a pipeline readable.
License
MIT
Metadata
Release files for iifunc 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iifunc-0.0.2.tar.gz | 2.7 kB | Without provenance | Details for iifunc-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iifunc-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for iifunc-0.0.2-py3-none-any.whl |
Total release size: 5.9 kB
Release files / iifunc-0.0.2.tar.gz
| Download URL | iifunc-0.0.2.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
135ee78ded536a677d62fd4ca6d62d52326283696fdc168f8e439a5800fc5052
|
|
BLAKE2b-256 checksum How to use checksums |
2ab2d7537d8224024c151f1e60f9fedf8bffa6d967fa064e3a13544ccc045bd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / iifunc-0.0.2-py3-none-any.whl
| Download URL | iifunc-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71db148fb995bfb69ed0e69ab6a5cdcb432046c943a5a7937a2781886f1ac070
|
|
BLAKE2b-256 checksum How to use checksums |
81b74bb458d3b2c676995070c49eed46b5d630effdf3bf3271251bb969d429e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for iifunc 0.0.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.