SDK Overview
ParticleDB provides multiple connectivity options: REST API, PostgreSQL wire protocol, gRPC, and WebSocket. Each SDK uses one or more of these transports. You can also use any standard PostgreSQL driver directly.
Quick Start
Section titled “Quick Start”# REST client (zero dependencies)pip install particledb
# With gRPC supportpip install particledb[grpc]# PG wire + streaming + gRPCnpm install particledb# PG wire + gRPCgo get github.com/particledb/particledb-go[dependencies]particledb-sdk = "0.1"<dependency> <groupId>com.particledb</groupId> <artifactId>particledb-java-sdk</artifactId> <version>0.1.0</version></dependency>dotnet add package ParticleDB.Clientimplementation("io.particledb:particledb-kotlin:0.1.0").package(url: "https://github.com/particledb/particledb-swift.git", from: "0.1.0")dependencies: particledb: ^0.1.0gem "particledb"composer require particledb/particledb-phpcd sdk/c && make && sudo make installadd_subdirectory(path/to/particledb-sdk)target_link_libraries(your_target particledb)npm install @particledb/webSDK Comparison
Section titled “SDK Comparison”| Language | Package | Transport | Vector | KV | RAG | AI |
|---|---|---|---|---|---|---|
| Python | particledb | REST + gRPC | Yes | Yes | Yes | — |
| TypeScript | particledb | PG wire + gRPC + WebSocket/SSE | Yes | Yes | Yes | Yes |
| Go | particledb-go | PG wire + gRPC | Yes | Yes | Yes | Yes |
| Java | particledb-java-sdk | JDBC (PG wire) + gRPC | Yes | Yes | Yes | Yes |
| Rust | particledb-sdk | SqlExecutor trait (pluggable) | Yes | Yes | Yes | Yes |
| C# / .NET | ParticleDB.Client | PG wire (Npgsql) | Yes | Yes | Yes | Yes |
| Kotlin | particledb-kotlin | REST (OkHttp) | Yes | Yes | Yes | — |
| Swift | particledb-swift | REST (URLSession) | Yes | Yes | Yes | — |
| Dart / Flutter | particledb | REST (http) | Yes | Yes | Yes | — |
| Ruby | particledb | REST (Net::HTTP) | Yes | Yes | Yes | — |
| PHP | particledb-php | REST (cURL) | Yes | Yes | Yes | — |
| C | libparticledb | REST (libcurl) | — | — | — | — |
| C++ | particledb (header-only) | PG wire (libpq) | Yes | Yes | Yes | Yes |
| Browser | @particledb/web | WebSocket | Yes | Yes | Yes | Yes |
Transport Details
Section titled “Transport Details”REST API (HTTP)
Section titled “REST API (HTTP)”Used by: Python, Kotlin, Swift, Dart, Ruby, PHP, C
The REST API runs on port 8080 by default. SDKs send SQL as JSON payloads to POST /v1/sql and receive structured JSON responses. Zero-dependency clients can be built using any HTTP library.
PostgreSQL Wire Protocol
Section titled “PostgreSQL Wire Protocol”Used by: TypeScript, Go, Java, C#, C++
Full compatibility with standard PostgreSQL drivers. Supports prepared statements, transactions, binary format, and pipeline mode. Runs on port 5432 by default.
Used by: Python, TypeScript, Go, Java
Native gRPC protocol with protobuf-encoded messages. Supports unary RPC, server-streaming (large result sets), client-streaming (bulk insert), and CDC event subscriptions. Default port 26257 (Go) or 50051 (Python) or 9090 (Java).
WebSocket
Section titled “WebSocket”Used by: Browser SDK
The browser SDK connects via WebSocket proxy for real-time bidirectional communication. Supports SQL queries, pub/sub event subscriptions, and automatic reconnection with exponential backoff.
What the SDKs Add
Section titled “What the SDKs Add”Standard PostgreSQL drivers give you full SQL access to ParticleDB. The ParticleDB SDKs add:
- Vector search helpers — Build and query vector indexes with a typed API instead of raw SQL
- KV operations —
get,set,delete,mset,incr,keysmethods for key-value workloads - RAG pipelines — Create named pipelines for retrieval-augmented generation workflows
- AI functions — Embeddings, text generation, classification, and summarization
- CDC streaming — Real-time change-data-capture event subscriptions (gRPC / WebSocket)
Next Steps
Section titled “Next Steps”- Python SDK — REST + gRPC client
- TypeScript SDK — PG wire + gRPC + streaming
- Go SDK — PG wire + gRPC client
- Rust SDK — Native Rust client with SqlExecutor trait
- Java SDK — JDBC + gRPC client
- C# / .NET SDK — Npgsql-based client
- Kotlin / Android — REST API via OkHttp
- Swift — REST API via URLSession
- Dart / Flutter — REST API via http package
- Ruby — REST API via Net::HTTP
- PHP — REST API via cURL
- C — REST API via libcurl
- C++ — Header-only, libpq
- Browser / WebSocket — Browser SDK via WebSocket
- PostgreSQL Wire Protocol — Protocol-level details
- gRPC — gRPC protocol details
- HTTP API — REST API reference