If Funcy and Pipe had a baby. Decorates all Funcy methods with Pipe superpowers.
Project description
Funcy with pipeline-based operators
If Funcy and Pipe had a baby. Deal with data transformation in python in a sane way.
Examples
import funcy_pipe as f
entities_from_sql_alchemy
| f.lmap(lambda r: r.to_dict())
| f.lmap(lambda r: r | f.omit(["id", "created_at", "updated_at"]))
| f.to_list
Extras
- to_list
- log
- bp
- sort
Module Alias
Create a module alias for funcy-pipe
to make things clean (import *
always irks me):
# fp.py
from funcy_pipe import *
# code py
import fp
Inspiration
- Elixir's pipe operator.
array |> map(fn) |> filter(fn)
- Ruby's enumerable library.
array.map(&:fn).filter(&:fn)
- https://pypi.org/project/funcy-chain
- https://github.com/JulienPalard/Pipe
TODO
- tests
- relax python version
- fix typing threading
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
funcy_pipe-0.3.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for funcy_pipe-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51886e431d9971bd0484c3b1c85b6d277b10e92ea571030aa4fec2875e155842 |
|
MD5 | 85a2ba8bb136b18b7db8641b41cf3a34 |
|
BLAKE2b-256 | e082d8d2f3ae1df4f38b9e43e023ab7d512891b9ccd3c342e0f8ffe29c0abe97 |