Skip to content

SDK Overview

Flo provides official SDKs for four languages. All SDKs use the same binary wire protocol and support the full feature set: KV, Streams, Queues, Time-Series, Actions, and Workers.

LanguagePackageTransportAsync
Gogo get github.com/floruntime/flo-goTCPGoroutines
Pythonpip install floTCPasyncio
JavaScript (Node.js)npm install @floruntime/nodeTCPPromise
JavaScript (Browser)npm install @floruntime/webWebSocketPromise
Zigflo-zig (build.zig.zon)TCP
FeatureGoPythonJS/TSZig
KV (get/put/delete/scan/history)
Queues (enqueue/dequeue/ack/nack/DLQ)
Streams (append/read/consumer groups)
Actions (register/invoke/status)
Workers (register/await/complete/fail)
Blocking gets / long polling
CAS (optimistic locking)
Worker framework (high-level)
Stream worker framework
Browser support (WebSocket)

All SDKs follow the same pattern:

  1. Create a client with host, optional namespace, and timeout
  2. Connect to the server
  3. Use subsystem accessorsclient.kv, client.queue, client.stream, client.action, client.worker
  4. Close when done
client = connect("localhost:9000", namespace="myapp")
client.kv.put("key", value)
client.queue.enqueue("tasks", payload)
client.stream.append("events", data)
client.close()

All operations default to the namespace configured on the client. You can override per-operation:

# Python
await client.kv.put("key", b"value") # uses default namespace
await client.kv.put("key", b"value", PutOptions(namespace="other")) # override

All SDKs provide typed errors:

ErrorMeaning
NotFoundKey/queue/stream doesn’t exist
ConflictCAS version mismatch
BadRequestInvalid parameters
UnauthorizedAuthentication failed
OverloadedServer at capacity, retry later
InternalServer error
NotConnectedClient not connected