bytewax.connectors.demo#
Connectors for writing local-first demo dataflows.
Data#
Classes#
- class RandomMetricSource#
- Bases:
FixedPartitionedSource[Tuple[str,float],_RandomMetricState]
Demo source that produces an infinite stream of random values.
Emits downstream
(metric_name, val)2-tuples.If you want to emit multiple different metrics, create multiple
bytewax.operators.input.inputsteps andbytewax.operators.merge.mergethem.Args: metric_name: To attach to each value.
interval: Emit a value on this cadence. Defaults to every 0.7 seconds. count: Number of values to generate. Defaults to infinite. next_random: Callable used to generate the next random value. Defaults to a random `int` between 0 and 10.