Metadata-Version: 2.4
Name: statefun-tasks
Version: 1.2.4
Summary: Tasks API for Stateful Functions on Flink
Home-page: https://fransking.github.io/flink-statefun-tasks
Author: Frans King & Luke Ashworth
Author-email: frans.king@sbbsystems.com
License: https://www.apache.org/licenses/LICENSE-2.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: kafka-python
Requires-Dist: protobuf
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Flink Tasks
Tasks API for Stateful Functions on Flink

## What is it?

A lightweight API that borrows concepts from Celery to allow Python developers to run task based workflows on Apache Flink Stateful Functions.  Workflows are composed of Tasks which accept parameters and can be chained together as continuations into a Pipeline.  The Pipeline becomes the Flink state.


```
@tasks.bind()
def greeting_workflow(first_name, last_name):
    return say_hello.send(first_name, last_name).continue_with(say_goodbye)


@tasks.bind()
def say_hello(first_name, last_name):
    return f'Hello {first_name} {last_name}'


@tasks.bind()
def say_goodbye(greeting):
    return f'{greeting}.  So now I will say goodbye'
```

Try the [demo](https://flink-demo-az.sbbsystems.co.uk).

Additional documentation can be found [here](https://fransking.github.io/flink-statefun-tasks).

The pipeline function can be downloaded [here](https://github.com/fransking/flink-statefun-tasks-embedded).
