Olivine · v0.8 · streaming ETL for Python
Streaming ETL with backpressure that just works.
A pipeline is a living thing: a source at the root, transforms in the middle, a sink at the tip. Demand flows back up from the sink so nothing ever floods — and every sink can commit exactly once.
pip install olivine
Source reads a Kafka topic
Transform map · key · window
Sink commits exactly once
Three stages, one flow
-
Source
Read from Kafka, Postgres CDC, or a generator. Every source joins the credit protocol, so it only pulls what the pipeline can absorb.
-
Transform
Filter and map one record at a time, or gather them into event-time windows with watermarks for late data. State is checkpointed.
-
Sink
Commit transactionally on each checkpoint barrier. Postgres, Kafka, and object stores all deliver exactly once, not just once-ish.
A whole pipeline in one file
No cluster, no coordinator. A pipeline is an ordinary Python process — wire the stages, call run(), and the runtime keeps the flow alive and in order.
from olivine import Pipeline, sources, sinks
pipe = Pipeline("orders")
(
pipe.source(sources.kafka(topic="orders"))
.filter(lambda o: o.total_cents >= 5000)
.map(lambda o: {"id": o.id, "usd": o.total_cents / 100})
.sink(sinks.postgres(table="big_orders",
delivery="exactly_once"))
)
pipe.run()
Guides
All guides-
Install and your first pipeline
Get Olivine running and move records from a generator source to a console sink in under five minutes.
-
How backpressure works
Credit-based flow control, bounded channels, and why a slow sink safely throttles a fast source.
-
Transforms, windows, and watermarks
Reshape and aggregate streams with stateless operators, keyed windows, and event-time watermarks.
-
Exactly-once sinks
How checkpoint barriers, transactional commits, and idempotent writes give end-to-end exactly-once delivery.
Connectors
All connectors-
Kafka source and sink
Read and write Kafka topics with offset-committed checkpoints and consumer-group backpressure.
-
Postgres sink
Commit rows to Postgres transactionally on every checkpoint for true exactly-once delivery.
-
Object store sink
Write partitioned files to any S3-compatible bucket with idempotent, checkpoint-aligned commits.
Why backpressure first?
Most stream processors treat backpressure as an afterthought — a queue that silently grows until a pod is killed and a page fires at 3am. Olivine treats it as the first thing. Demand flows upstream from the sink, credit by credit, so a slow database or a rate-limited API gently throttles the source instead of drowning it. Nothing buffers without a reader. Nothing spills to disk you did not ask for.
Because flow control is built in, the rest of the framework can stay small. A pipeline is three kinds of stage — a source that reads, one or more transforms that reshape, and a sink that commits — wired together and handed to the runtime. Checkpoint barriers ride the same channels as your data, so every sink can offer exactly-once delivery without a bolt-on transaction manager. You describe the shape of the flow; Olivine keeps it alive, in order, and honest about how fast it can go.