π₯ Breaking changes: imports
Two major changes have been introduced:
- Imports are no longer at the top level but are now nested their respective modules
- For the π python implementation, the available imports have changed
from pipe_operator.elixir_flow import elixir_pipe, tap, then
from pipe_operator.python_flow import end, pipe, start, tap, task, then, wait
If you were using the python implementation before, the migration is quite simple. Here is the mapping:
Before | After |
---|---|
PipeStart |
start |
Pipe |
pipe |
PipeArgs |
pipe |
Tap |
tap |
Then |
then |
ThreadPipe |
task |
ThreadWait |
wait |
PipeEnd |
end |
π New feature: async function support
The π python implementation now support async functions from asyncio
.
When using pipe
, tap
, or task
, you can freely pass an async or sync function as the first argument.
As for then
, it only supports single-arg lambda function.
π§ Other changes
- β¨ [Python] Exported classes with aliases (ie
PipeStart
is exported asstart
) for improved readability - π§ [Python] Updated documentation (docstrings and README.md)
- π§ [Python]
>>
logic is now handle in each pipeable's__rrshift__
instead ofPipeObject.__rshift__
- π§ [Python] Greatly improved typing annotations (using
@overload
,@override
,TypeAlias
,TypeGuard
, ...) - π§ [Python] Updated deps