Start building streaming
data applications today. In Python.
Open source framework and distributed stream processing engine. Build streaming data pipelines and real-time apps with everything you need: recovery, scalability, windowing, aggregations, and connectors.
First steps to explore
Bytewax features
Build streaming data applications easily. In Python.
> pip install bytewax
from bytewax import operators as op
from bytewax.connectors.kafka import operators as kop
from bytewax.dataflow import Dataflow
BROKERS = ["localhost:19092"]
IN_TOPICS = ["in_topic"]
OUT_TOPIC = "out_topic"
flow = Dataflow("kafka_in_out")
kinp = kop.input("inp", flow, brokers=BROKERS, topics=IN_TOPICS)
op.inspect("inspect-errors", kinp.errs)
op.inspect("inspect-oks", kinp.oks)
kop.output("out1", kinp.oks, brokers=BROKERS, topic=OUT_TOPIC)
from datetime import timedelta
import numpy as np
from bytewax.operators import window as window_op
from bytewax.operators.window import TumblingWindow, SystemClockConfig
cc = SystemClockConfig()
wc = TumblingWindow(length=timedelta(seconds=1))
def build_array():
return np.empty(0)
def insert_value(np_array, value):
return np.insert(np_array, 0, value)
windowed_stream = wop.fold_window("window", stream, cc, wc, build_array, insert_value)
import numpy as np
avg_stream = flow.map("average", windowed_stream, lambda x: np.mean(x[1]))
> python -m bytewax.run my_dataflow:flow
> waxctl df deploy my_dataflow.py
Unite batch and stream processing with stateful streaming
Apply a function to each element in the data stream
Each item can be transformed into zero or more elements
Keep only elements that match a condition
Pass each element through and allows side effects
Transforms each item in a window into a new item
Inspect, but for windowed operations
Aggregate elements using a reducer function
Combine elements from two streams based on a key
Maintains state between elements, allowing for more complex transformations.
Allows initialization, state update, and result computation
Group elements into windows based on time or count, maintaining state for each
Define your own operators based on your own semantic (e.g. interval joins)
Learn how to build real-time data apps with Bytewax
Leverage the Python Ecosystem
Bytewax can be used out-of-the box with any python library to connect to hundreds of data sources and use the entire ecosystem of data processing libraries.
Check out the latest articles on our blog
Join our community
Join our Slack channel
Slack is the main channel for communicating with members of the community and Bytewax team members.
Community channelContribute to Bytewax
We welcome contributions to the repository. Feel free to reach out if you are looking for support.
Contributor's guideCheck our events
Keep up with the events where you can meet some of the Bytewax team.
Events