tributary


Nametributary JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/streamlet-dev/tributary
SummaryStreaming reactive and dataflow graphs in Python
upload_time2023-05-10 10:38:01
maintainer
docs_urlNone
authorTim Paine
requires_python>=3.7
licenseApache 2.0
keywords streaming lazy graph dag dataflow reactive
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # <img src="https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/icon.png" width="300">
Python Data Streams

[![Build Status](https://github.com/streamlet-dev/tributary/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/streamlet-dev/tributary/actions?query=workflow%3A%22Build+Status%22)
[![Coverage](https://codecov.io/gh/streamlet-dev/tributary/branch/main/graph/badge.svg)](https://codecov.io/gh/streamlet-dev/tributary)
[![PyPI](https://img.shields.io/pypi/l/tributary.svg)](https://pypi.python.org/pypi/tributary)
[![PyPI](https://img.shields.io/pypi/v/tributary.svg)](https://pypi.python.org/pypi/tributary)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/streamlet-dev/tributary/main?urlpath=lab)


Tributary is a library for constructing dataflow graphs in python. Unlike many other DAG libraries in python ([airflow](https://airflow.apache.org), [luigi](https://luigi.readthedocs.io/en/stable/), [prefect](https://docs.prefect.io), [dagster](https://docs.dagster.io), [dask](https://dask.org), [kedro](https://github.com/quantumblacklabs/kedro), etc), tributary is not designed with data/etl pipelines or scheduling in mind. Instead, tributary is more similar to libraries like [mdf](https://github.com/man-group/mdf), [loman](https://github.com/janushendersonassetallocation/loman), [pyungo](https://github.com/cedricleroy/pyungo), [streamz](https://streamz.readthedocs.io/en/latest/), or [pyfunctional](https://github.com/EntilZha/PyFunctional), in that it is designed to be used as the implementation for a data model. One such example is the [greeks](https://github.com/streamlet-dev/greeks) library, which leverages tributary to build data models for [options pricing](https://www.investopedia.com/articles/optioninvestor/07/options_beat_market.asp). 

![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/example.gif)


# Installation
Install with pip:

`pip install tributary`

or with conda:

`conda install -c conda-forge tributary`

or from source:

`python setup.py install`

Note: If installing from source or with pip, you'll also need [Graphviz itself](https://www.graphviz.org/download/) if you want to visualize the graph using the `.graphviz()` method.

# Stream Types
Tributary offers several kinds of streams:

## Streaming
These are synchronous, reactive data streams, built using asynchronous python generators. They are designed to mimic complex event processors in terms of event ordering.

## Functional
These are functional streams, built by currying python functions (callbacks). 

## Lazy
These are lazily-evaluated python streams, where outputs are propogated only as inputs change. They are implemented as directed acyclic graphs.

# Examples
- [Streaming](docs/examples/streaming/streaming.md): In this example, we construct a variety of forward propogating reactive graphs.
- [Lazy](docs/examples/lazy/lazy.md): In this example, we construct a variety of lazily-evaluated directed acyclic computation graphs. 
- [Automatic Differentiation](docs/examples/autodiff/autodiff.md): In this example, we use `tributary` to perform automatic differentiation on both lazy and streaming graphs.

# Graph Visualization
You can visualize the graph with Graphviz. All streaming and lazy nodes support a `graphviz` method.

Streaming and lazy nodes also support [ipydagred3](https://github.com/timkpaine/ipydagred3) for live update monitoring.

## Streaming
![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/streaming/dagred3.gif)

Here green indicates executing, yellow indicates stalled for backpressure, and red indicates that `StreamEnd` has been propogated (e.g. stream has ended).

## Lazy
![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/lazy/dagred3.gif)

Here green indicates executing, and red indicates that the node is dirty. Note the the determination if a node is dirty is also done lazily (we can check with `isDirty` whcih will update the node's graph state.

## Catalog
See the [CATALOG](CATALOG.md) for a full list of functions, transforms, sources, and sinks.

## Support / Contributors
Thanks to the following organizations for providing code or financial support.


<a href="https://nemoulous.com"><img src="https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/nem.png" width="50"></a>

<a href="https://nemoulous.com">Nemoulous</a>

## License
This software is licensed under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.

## Alternatives
Here is an incomplete list of libraries which implement similar/overlapping functionality

- [man-group/mdf](https://github.com/man-group/mdf)
- [cedricleroy/pyungo](https://github.com/cedricleroy/pyungo)
- [python-streamz/streamz](https://github.com/python-streamz/streamz)
- [EntilZha/pyfunctional](https://github.com/EntilZha/PyFunctional)
- [stitchfix/hamilton](https://github.com/stitchfix/hamilton)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/streamlet-dev/tributary",
    "name": "tributary",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "streaming lazy graph dag dataflow reactive",
    "author": "Tim Paine",
    "author_email": "t.paine154@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/cf/cf7180aa27943a361783c8bde4eb888cb63b5ac9da626df33151a66fa9df/tributary-0.2.1.tar.gz",
    "platform": null,
    "description": "# <img src=\"https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/icon.png\" width=\"300\">\nPython Data Streams\n\n[![Build Status](https://github.com/streamlet-dev/tributary/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/streamlet-dev/tributary/actions?query=workflow%3A%22Build+Status%22)\n[![Coverage](https://codecov.io/gh/streamlet-dev/tributary/branch/main/graph/badge.svg)](https://codecov.io/gh/streamlet-dev/tributary)\n[![PyPI](https://img.shields.io/pypi/l/tributary.svg)](https://pypi.python.org/pypi/tributary)\n[![PyPI](https://img.shields.io/pypi/v/tributary.svg)](https://pypi.python.org/pypi/tributary)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/streamlet-dev/tributary/main?urlpath=lab)\n\n\nTributary is a library for constructing dataflow graphs in python. Unlike many other DAG libraries in python ([airflow](https://airflow.apache.org), [luigi](https://luigi.readthedocs.io/en/stable/), [prefect](https://docs.prefect.io), [dagster](https://docs.dagster.io), [dask](https://dask.org), [kedro](https://github.com/quantumblacklabs/kedro), etc), tributary is not designed with data/etl pipelines or scheduling in mind. Instead, tributary is more similar to libraries like [mdf](https://github.com/man-group/mdf), [loman](https://github.com/janushendersonassetallocation/loman), [pyungo](https://github.com/cedricleroy/pyungo), [streamz](https://streamz.readthedocs.io/en/latest/), or [pyfunctional](https://github.com/EntilZha/PyFunctional), in that it is designed to be used as the implementation for a data model. One such example is the [greeks](https://github.com/streamlet-dev/greeks) library, which leverages tributary to build data models for [options pricing](https://www.investopedia.com/articles/optioninvestor/07/options_beat_market.asp). \n\n![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/example.gif)\n\n\n# Installation\nInstall with pip:\n\n`pip install tributary`\n\nor with conda:\n\n`conda install -c conda-forge tributary`\n\nor from source:\n\n`python setup.py install`\n\nNote: If installing from source or with pip, you'll also need [Graphviz itself](https://www.graphviz.org/download/) if you want to visualize the graph using the `.graphviz()` method.\n\n# Stream Types\nTributary offers several kinds of streams:\n\n## Streaming\nThese are synchronous, reactive data streams, built using asynchronous python generators. They are designed to mimic complex event processors in terms of event ordering.\n\n## Functional\nThese are functional streams, built by currying python functions (callbacks). \n\n## Lazy\nThese are lazily-evaluated python streams, where outputs are propogated only as inputs change. They are implemented as directed acyclic graphs.\n\n# Examples\n- [Streaming](docs/examples/streaming/streaming.md): In this example, we construct a variety of forward propogating reactive graphs.\n- [Lazy](docs/examples/lazy/lazy.md): In this example, we construct a variety of lazily-evaluated directed acyclic computation graphs. \n- [Automatic Differentiation](docs/examples/autodiff/autodiff.md): In this example, we use `tributary` to perform automatic differentiation on both lazy and streaming graphs.\n\n# Graph Visualization\nYou can visualize the graph with Graphviz. All streaming and lazy nodes support a `graphviz` method.\n\nStreaming and lazy nodes also support [ipydagred3](https://github.com/timkpaine/ipydagred3) for live update monitoring.\n\n## Streaming\n![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/streaming/dagred3.gif)\n\nHere green indicates executing, yellow indicates stalled for backpressure, and red indicates that `StreamEnd` has been propogated (e.g. stream has ended).\n\n## Lazy\n![](https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/lazy/dagred3.gif)\n\nHere green indicates executing, and red indicates that the node is dirty. Note the the determination if a node is dirty is also done lazily (we can check with `isDirty` whcih will update the node's graph state.\n\n## Catalog\nSee the [CATALOG](CATALOG.md) for a full list of functions, transforms, sources, and sinks.\n\n## Support / Contributors\nThanks to the following organizations for providing code or financial support.\n\n\n<a href=\"https://nemoulous.com\"><img src=\"https://raw.githubusercontent.com/streamlet-dev/tributary/main/docs/img/nem.png\" width=\"50\"></a>\n\n<a href=\"https://nemoulous.com\">Nemoulous</a>\n\n## License\nThis software is licensed under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.\n\n## Alternatives\nHere is an incomplete list of libraries which implement similar/overlapping functionality\n\n- [man-group/mdf](https://github.com/man-group/mdf)\n- [cedricleroy/pyungo](https://github.com/cedricleroy/pyungo)\n- [python-streamz/streamz](https://github.com/python-streamz/streamz)\n- [EntilZha/pyfunctional](https://github.com/EntilZha/PyFunctional)\n- [stitchfix/hamilton](https://github.com/stitchfix/hamilton)\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Streaming reactive and dataflow graphs in Python",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/streamlet-dev/tributary"
    },
    "split_keywords": [
        "streaming",
        "lazy",
        "graph",
        "dag",
        "dataflow",
        "reactive"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0656d66d6705d1fb42af81ca3abdd6e102e16f0ec7360691139345774e0dea19",
                "md5": "9ee6c1fed31dd3affd62566b95c90548",
                "sha256": "206f033d090649dba375340c394a0f8874a4f59bdda123a216797ca866abf17c"
            },
            "downloads": -1,
            "filename": "tributary-0.2.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9ee6c1fed31dd3affd62566b95c90548",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 113399,
            "upload_time": "2023-05-10T10:37:59",
            "upload_time_iso_8601": "2023-05-10T10:37:59.023349Z",
            "url": "https://files.pythonhosted.org/packages/06/56/d66d6705d1fb42af81ca3abdd6e102e16f0ec7360691139345774e0dea19/tributary-0.2.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbcfcf7180aa27943a361783c8bde4eb888cb63b5ac9da626df33151a66fa9df",
                "md5": "867c53dfd794976456d8071735cf3e77",
                "sha256": "7f99e8257e989fabf5bb60b06dea5dd10d13c14b90de93490855d5b68d6c6fe6"
            },
            "downloads": -1,
            "filename": "tributary-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "867c53dfd794976456d8071735cf3e77",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 81658,
            "upload_time": "2023-05-10T10:38:01",
            "upload_time_iso_8601": "2023-05-10T10:38:01.779955Z",
            "url": "https://files.pythonhosted.org/packages/fb/cf/cf7180aa27943a361783c8bde4eb888cb63b5ac9da626df33151a66fa9df/tributary-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-10 10:38:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "streamlet-dev",
    "github_project": "tributary",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tributary"
}
        
Elapsed time: 0.19298s