Skip to main content

A python native stateful streaming framework

Project description

fluxt

codecov PyPI version

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluxt-0.0.dev2.tar.gz (11.7 kB view details)

Uploaded Source

File details

Details for the file fluxt-0.0.dev2.tar.gz.

File metadata

  • Download URL: fluxt-0.0.dev2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for fluxt-0.0.dev2.tar.gz
Algorithm Hash digest
SHA256 d779f738a8bf10c64184eadbe9633234d68c58cf19de26d3fb320c815daad5ad
MD5 3f51330a35527553e7e77617566a5546
BLAKE2b-256 6f54138e099bf0d81c403f4174c33510ae92a40bd084af4f870dcc17026e3ca0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page