https://github.com/fransking/flink-statefun-tasks
Tasks API for Stateful Functions on Flink
https://github.com/fransking/flink-statefun-tasks
flink python statefun
Last synced: 2 months ago
JSON representation
Tasks API for Stateful Functions on Flink
- Host: GitHub
- URL: https://github.com/fransking/flink-statefun-tasks
- Owner: fransking
- License: apache-2.0
- Created: 2020-09-21T08:03:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-02-28T11:17:03.000Z (4 months ago)
- Last Synced: 2026-02-28T15:39:39.318Z (4 months ago)
- Topics: flink, python, statefun
- Language: Python
- Homepage: https://flink-demo-az.sbbsystems.co.uk
- Size: 7.03 MB
- Stars: 13
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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).