fluxt


Namefluxt JSON
Version 0.0.dev2 PyPI version JSON
download
home_pagehttps://github.com/SamuelHornsey/fluxt
SummaryA python native stateful streaming framework
upload_time2023-01-21 03:39:42
maintainer
docs_urlNone
authorSamuel Hornsey
requires_python>=3.7
licenseMIT
keywords streaming events processing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # fluxt

[![codecov](https://codecov.io/gh/SamuelHornsey/fluxt/branch/main/graph/badge.svg?token=NIV5LW1E98)](https://codecov.io/gh/SamuelHornsey/fluxt)
[![PyPI version](https://badge.fury.io/py/fluxt.svg)](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
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SamuelHornsey/fluxt",
    "name": "fluxt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "streaming events processing",
    "author": "Samuel Hornsey",
    "author_email": "hello@samuelhornsey.com",
    "download_url": "https://files.pythonhosted.org/packages/6f/54/138e099bf0d81c403f4174c33510ae92a40bd084af4f870dcc17026e3ca0/fluxt-0.0.dev2.tar.gz",
    "platform": null,
    "description": "# fluxt\n\n[![codecov](https://codecov.io/gh/SamuelHornsey/fluxt/branch/main/graph/badge.svg?token=NIV5LW1E98)](https://codecov.io/gh/SamuelHornsey/fluxt)\n[![PyPI version](https://badge.fury.io/py/fluxt.svg)](https://badge.fury.io/py/fluxt)\n\nA python native stateful streaming framework\n\n## About\n\n\u26a0\ufe0f **Very Early Development**: This platform will change rapidly\n\nThis 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. \n\n## Getting Started\n\n```python\nfrom fluxt import Fluxt\nfrom fluxt.storage import LevelStore\n\n\n# create a streaming app\nfluxt = Fluxt(name='basic_reduce')\n\nword_count = fluxt.State('word_count', default=0,\n                store=LevelStore('/tmp/data'))\n\n\n@fluxt.operation()\ndef tokenize(event, output):\n    for word in event.lower().split():\n        output.send(word)\n\n\n@fluxt.operation(state=word_count)\ndef count(event, output, state):\n    state[event] += 1\n    output.send((event, state[event]))\n\n\n@fluxt.stream()\ndef word_count_processor(datastream):\n    events = ['welcome', 'to', 'fluxt!',\n                'The', 'python', 'streaming framework']\n\n    datastream.source_from_collection(events)\n\n    datastream.pipeline(tokenize, count)\n\n    datastream.print()\n\n\nif __name__ == '__main__':\n    # run the fluxt app\n    fluxt.run()\n```\n\n### Installing Plyvel on Mac\n\n```sh\nCFLAGS='-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\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python native stateful streaming framework",
    "version": "0.0.dev2",
    "split_keywords": [
        "streaming",
        "events",
        "processing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f54138e099bf0d81c403f4174c33510ae92a40bd084af4f870dcc17026e3ca0",
                "md5": "3f51330a35527553e7e77617566a5546",
                "sha256": "d779f738a8bf10c64184eadbe9633234d68c58cf19de26d3fb320c815daad5ad"
            },
            "downloads": -1,
            "filename": "fluxt-0.0.dev2.tar.gz",
            "has_sig": false,
            "md5_digest": "3f51330a35527553e7e77617566a5546",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11716,
            "upload_time": "2023-01-21T03:39:42",
            "upload_time_iso_8601": "2023-01-21T03:39:42.553366Z",
            "url": "https://files.pythonhosted.org/packages/6f/54/138e099bf0d81c403f4174c33510ae92a40bd084af4f870dcc17026e3ca0/fluxt-0.0.dev2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-21 03:39:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "SamuelHornsey",
    "github_project": "fluxt",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "test_requirements": [],
    "lcname": "fluxt"
}
        
Elapsed time: 0.03849s