Metadata-Version: 2.1
Name: tributary
Version: 0.0.9
Summary: Analytics library
Home-page: https://github.com/timkpaine/tributary
Author: Tim Paine
Author-email: timothy.k.paine@gmail.com
License: Apache 2.0
Keywords: analytics tools plotting
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
Requires-Dist: aiohttp (>=3.5.4)
Requires-Dist: aiofiles (>=0.4.0)
Requires-Dist: aiostream (>=0.3.1)
Requires-Dist: confluent-kafka (==0.11.6)
Requires-Dist: future (>=0.17.1)
Requires-Dist: gevent (>=1.3.7)
Requires-Dist: graphviz (>=0.10.1)
Requires-Dist: ipython (>=7.0.1)
Requires-Dist: networkx (>=2.2)
Requires-Dist: numpy (>=1.15.3)
Requires-Dist: pandas (>=0.19.0pygraphviz>=1.5)
Requires-Dist: scipy (>1.2.0)
Requires-Dist: six (>=1.11.0)
Requires-Dist: socketIO-client-nexus (>=0.7.6)
Requires-Dist: sympy (>=1.3)
Requires-Dist: temporal-cache (>=0.0.6)
Requires-Dist: tornado (>=5.1.1)
Requires-Dist: websockets (>=8.0)
Provides-Extra: dev
Requires-Dist: flake8 (>=3.7.8) ; extra == 'dev'
Requires-Dist: mock ; extra == 'dev'
Requires-Dist: pybind11 (>=2.4.0) ; extra == 'dev'
Requires-Dist: pytest (>=4.3.0) ; extra == 'dev'
Requires-Dist: pytest-cov (>=2.6.1) ; extra == 'dev'
Requires-Dist: Sphinx (>=1.8.4) ; extra == 'dev'
Requires-Dist: sphinx-markdown-builder (>=0.5.2) ; extra == 'dev'
Requires-Dist: aiohttp (>=3.5.4) ; extra == 'dev'
Requires-Dist: aiofiles (>=0.4.0) ; extra == 'dev'
Requires-Dist: aiostream (>=0.3.1) ; extra == 'dev'
Requires-Dist: confluent-kafka (==0.11.6) ; extra == 'dev'
Requires-Dist: future (>=0.17.1) ; extra == 'dev'
Requires-Dist: gevent (>=1.3.7) ; extra == 'dev'
Requires-Dist: graphviz (>=0.10.1) ; extra == 'dev'
Requires-Dist: ipython (>=7.0.1) ; extra == 'dev'
Requires-Dist: networkx (>=2.2) ; extra == 'dev'
Requires-Dist: numpy (>=1.15.3) ; extra == 'dev'
Requires-Dist: pandas (>=0.19.0pygraphviz>=1.5) ; extra == 'dev'
Requires-Dist: scipy (>1.2.0) ; extra == 'dev'
Requires-Dist: six (>=1.11.0) ; extra == 'dev'
Requires-Dist: socketIO-client-nexus (>=0.7.6) ; extra == 'dev'
Requires-Dist: sympy (>=1.3) ; extra == 'dev'
Requires-Dist: temporal-cache (>=0.0.6) ; extra == 'dev'
Requires-Dist: tornado (>=5.1.1) ; extra == 'dev'
Requires-Dist: websockets (>=8.0) ; extra == 'dev'

# <a href="https://tributary.readthedocs.io"><img src="docs/img/icon.png" width="300"></a>
Python Data Streams

[![Build Status](https://dev.azure.com/tpaine154/tributary/_apis/build/status/timkpaine.tributary?branchName=master)](https://dev.azure.com/tpaine154/tributary/_build/latest?definitionId=2&branchName=master)
[![GitHub issues](https://img.shields.io/github/issues/timkpaine/tributary.svg)](https://github.com/timkpaine/tributary/issues)
[![Coverage](https://img.shields.io/azure-devops/coverage/tpaine154/tributary/2)](https://dev.azure.com/tpaine154/tributary/_build?definitionId=2&_a=summary)
[![BCH compliance](https://bettercodehub.com/edge/badge/timkpaine/tributary?branch=master)](https://bettercodehub.com/)
[![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)
[![Docs](https://img.shields.io/readthedocs/tributary.svg)](https://tributary.readthedocs.io)

![](https://raw.githubusercontent.com/timkpaine/tributary/master/docs/img/example.gif)


# Installation
Install from pip:

`pip install tributary`

or from source

`python setup.py install`

# 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.

# Examples
- [Streaming](docs/examples/streaming/streaming.md)
- [Lazy](docs/examples/lazy/lazy.md)

# Sources and Sinks
## Sources
- Python Function/Generator/Async Function/Async Generator
- Random
- File
- Kafka
- Websocket
- Http
- SocketIO

## Sinks
- File
- Kafka
- Http
- Websocket
- SocketIO

# Transforms
- Delay - Streaming wrapper to delay a stream
- Apply - Streaming wrapper to apply a function to an input stream
- Window - Streaming wrapper to collect a window of values
- Unroll - Streaming wrapper to unroll an iterable stream
- UnrollDataFrame - Streaming wrapper to unroll a dataframe into a stream
- Merge - Streaming wrapper to merge 2 inputs into a single output
- ListMerge - Streaming wrapper to merge 2 input lists into a single output list
- DictMerge - Streaming wrapper to merge 2 input dicts into a single output dict. Preference is given to the second input (e.g. if keys overlap)
- Reduce - Streaming wrapper to merge any number of inputs

# Calculations
- Noop
- Negate
- Invert
- Add
- Sub
- Mult
- Div
- RDiv
- Mod
- Pow
- Sum
- Average
- Not
- And
- Or
- Equal
- NotEqual
- Less
- LessOrEqual
- Greater
- GreaterOrEqual
- Log
- Sin
- Cos
- Tan
- Arcsin
- Arccos
- Arctan
- Sqrt
- Abs
- Exp
- Erf
- Int
- Float
- Bool
- Str
- Len

# Rolling
- RollingCount - Node to count inputs
- RollingMin - Node to take rolling min of inputs
- RollingMax - Node to take rolling max of inputs
- RollingSum - Node to take rolling sum inputs
- RollingAverage - Node to take the running average


