A streaming toolkit with bottomless storage
- Embedded
- Single node
- Clustered
- HTTP API
- Web UI
- Kafka gateway
- S3
- GCS
- Azure blob storage
- MinIO
- R2
- Local
- Python bindings
- Elixir bindings
- Zig bindings
- C bindings
> branch --help
Usage: branch [OPTIONS] COMMAND [ARGS]...
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ init │
│ produce │
│ consume │
│ topics │
│ server │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯Create your configuration file by following the prompts
> branch init
...Create a topic
> branch topics create \
--topic=my-topic.v1 \
--partitions=3Produce a new record every second
> watch -n 1 \
'branch produce --topic=my-topic.v1 --partition=0 --message=\'{"hello": "cli!", "now": "$(date --iso-8601=ns)"}\''
...Consume records produced to my-topic.v1
> branch consume --topic=my-topic.v1
...# my-branch.py
import branch
from datetime import datetime
msg = '{"hello": "python!", "now": datetime.now()}'
producer_record = branch.ProducerRecord(topic="my-topic.v1", value=msg)
branch.produce(producer_record)
branch.consume("my-topic.v1")> python my-branch.py
...> branch server start --port=9000 --ui-port=8999
...> branch server start --host=0.0.0.0 --port=9001 --name=my-branch-1
...
> branch server start --host=0.0.0.0 --port=9002 --name=my-branch-2
...> curl -X POST -d '{...}' http://localhost:9000/api/v1/produce
...> curl http://localhost:9000/api/v1/consume
...> open http://localhost:8999This repository manages the dev environment as a Nix flake and requires Nix to be installed
nix develop -c $SHELLmake allmake deps.install
make deps.install/devmake deps.freeze
make deps.freeze/devmake deps/reqs
make deps/outdated
make deps/checkmake run
make run/servermake format
make format/checkmake typecheckmake lintmake test
make test/watchmake coveragemake build
make build/pyinstaller
make build/nuitkamake execmake cleanmake compose.build
make compose.upmake docker.build/deps
make docker.build/runbranch is released under the MIT license