Functional piping for Python. ➡️
Project description
➡️ Pipe fp
Functional piping for Python.
Simple ⬦ Clear ⬦ Concise
Background
Piping is a method targeting code composition style, taking input data and passing it through a series of functions to produce a final output data.
Usage
Pipe fp is a tool to compose code in a simple, clear, and concise manner.
Features
- Composable pipelines; build it.
- Lazy evaluation; call any time later.
- Lambda functions with type hinting via generics! ✨
Example
Without Generics
from pipe_fp import pipe
pipe(
str.lower,
str.title,
str.split
)('WHY, HELLO THERE! 🐰')
Returns
['Why,', 'Hello', 'There!', '🐰']
Using Generics
from pipe_fp import pipe
# msg will be of type str; not Any! 😲
pipe[str](
lambda msg: msg.lower(),
lambda msg: msg.title(),
lambda msg: msg.split()
)('WHY, HELLO THERE! 🐰')
Returns
['Why,', 'Hello', 'There!', '🐰']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pipe_fp-2.0.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipe_fp-2.0.0.tar.gz.
File metadata
- Download URL: pipe_fp-2.0.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d635517352022d5601af88db4b51059b1cfa5f7cb3cbaaae508c4a38a8dca45b
|
|
| MD5 |
05563d3657c5de67d97394a0947b2899
|
|
| BLAKE2b-256 |
90c6b9f0b9c9d49b74b76860daf86404f3b6198af4faf0a103b44d767a57e33b
|
File details
Details for the file pipe_fp-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pipe_fp-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e1eee653077d6ff442dfc4b7aecf503edb0ba33a199785d7ab3414531e3b2eb
|
|
| MD5 |
3768ab32564b656748433e5e1286fc20
|
|
| BLAKE2b-256 |
9542013550aaaded6142e810079178185382461b4863a20603a390bee9d97214
|