Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@Jordan-Kowal Jordan-Kowal released this 11 Jan 17:44
· 3 commits to main since this release

πŸ’₯ 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 as start) for improved readability
  • πŸ”§ [Python] Updated documentation (docstrings and README.md)
  • πŸ”§ [Python] >> logic is now handle in each pipeable's __rrshift__ instead of PipeObject.__rshift__
  • πŸ”§ [Python] Greatly improved typing annotations (using @overload, @override, TypeAlias, TypeGuard, ...)
  • πŸ”§ [Python] Updated deps