fluxt-0.0.dev2
توضیحات
A python native stateful streaming framework
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fluxt-0.0.dev2 |
| نام | fluxt |
| نسخه کتابخانه | 0.0.dev2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Samuel Hornsey |
| ایمیل نویسنده | hello@samuelhornsey.com |
| آدرس صفحه اصلی | https://github.com/SamuelHornsey/fluxt |
| آدرس اینترنتی | https://pypi.org/project/fluxt/ |
| مجوز | MIT |
# fluxt
[](https://codecov.io/gh/SamuelHornsey/fluxt)
[](https://badge.fury.io/py/fluxt)
A python native stateful streaming framework
## About
⚠️ **Very Early Development**: This platform will change rapidly
This is a new project that is in very early development stages. This project aims to provide a pythonic, native alternative to Spark, Flink or Storm.
## Getting Started
```python
from fluxt import Fluxt
from fluxt.storage import LevelStore
# create a streaming app
fluxt = Fluxt(name='basic_reduce')
word_count = fluxt.State('word_count', default=0,
store=LevelStore('/tmp/data'))
@fluxt.operation()
def tokenize(event, output):
for word in event.lower().split():
output.send(word)
@fluxt.operation(state=word_count)
def count(event, output, state):
state[event] += 1
output.send((event, state[event]))
@fluxt.stream()
def word_count_processor(datastream):
events = ['welcome', 'to', 'fluxt!',
'The', 'python', 'streaming framework']
datastream.source_from_collection(events)
datastream.pipeline(tokenize, count)
datastream.print()
if __name__ == '__main__':
# run the fluxt app
fluxt.run()
```
### Installing Plyvel on Mac
```sh
CFLAGS='-g -stdlib=libc++ -std=c++11 -fno-rtti' pip install --force-reinstall --global-option="build_ext" --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" plyvel
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl fluxt-0.0.dev2:
pip install fluxt-0.0.dev2.whl
نصب پکیج tar.gz fluxt-0.0.dev2:
pip install fluxt-0.0.dev2.tar.gz