Graduation to server
Pin your version and read the changelog before upgrading.
A pipeline built in Python can export deployment-ready YAML and move to the standalone engine or the control plane without rewriting configuration.
Export
flow = (
arkflow.Pipeline()
.from_kafka(brokers=["b:9092"], topics=["events"], group_id="g")
.sql("SELECT user, SUM(amount) AS total FROM flow GROUP BY user")
.to_kafka(brokers=["b:9092"], topic="out")
)
flow.to_yaml("./flow.yaml") # write to a file
yaml_text = flow.to_yaml() # or return the string
The exported YAML validates with arkflow --config flow.yaml --validate and
deploys like any other configuration — including
jobs through the control plane.
Export restrictions
to_yaml raises ConfigError when:
- the pipeline sources from in-memory Python data (
from_iter) — it cannot be serialized; swap in a connector source (from_kafka/from_http/...) first; - the pipeline has no sink — add one (
to_stdout/to_kafka/to_qdrant/...).
round-tripping Python UDFs
A map_batches callable exports as a python processor placeholder keyed by
the callable's name. Run it back in-process by injecting callables:
arkflow.run_yaml("./flow.yaml", python_processors={"enrich": enrich})
run_yaml runs any standard YAML config locally — path or YAML string. The
injected callables work on wheel builds even without the connectors-python
feature; a non-injected python entry in the YAML requires it.
When to graduate
Move from the SDK to arkflow-server when you need any of:
- an independent process lifecycle (restarts without your Python app),
- multiple streams per process and shared control-plane operations,
- fleet placement, rollouts, approvals, and audit,
- checkpoints visible in the operations API.
Keep it embedded when the pipeline is a feature inside your application and process-local state is acceptable.
Verification
- Export and validate:
arkflow --config flow.yaml --validate. - Run it with the binary and compare output with the SDK run.
- If a
pythonplaceholder is present, run withrun_yaml(..., python_processors=...)or replace the processor with a non-Python one before server deployment.