Hasty Briefsbeta

双语

Native Python and TypeScript Drivers for ArcadeDB, from OpenAPI and Protobuf

20 days ago
  • ArcadeDB now has four native drivers: HTTP and gRPC for Python (arcadedb-driver, arcadedb-driver-grpc) and HTTP and gRPC for TypeScript/JavaScript (@arcadedb/driver, @arcadedb/driver-grpc), all Apache-2.0 and available on PyPI/npm.
  • HTTP drivers are suited for browser code, low dependencies, serverless functions, and existing HTTP infrastructure; gRPC drivers suit server-to-server, streaming large results, bulk inserts, and bidirectional streaming.
  • Browser code must use HTTP drivers because ArcadeDB’s gRPC plugin lacks gRPC-Web support – there is no browser build for gRPC.
  • Query examples show synchronous and async usage in Python (with httpx connection pools) and TypeScript (ESM only, Node 20+). The result envelope includes a `truncated` boolean – essential for detecting partial results.
  • Transactions are wrapped in language-native idioms: Python context manager and TypeScript callback. All calls inside a transaction must use the `tx` handle.
  • gRPC drivers support streaming queries (`streamQuery`) with three modes (CURSOR, MATERIALIZE_ALL, PAGED) and streaming inserts with automated envelope management. Password authentication is rejected over insecure channels.
  • All drivers are generated from canonical OpenAPI and Protobuf contracts published by ArcadeDB, with drift gates that prevent stale code from shipping – no manual type maintenance.
  • Releases are built by CI with provenance attestations (npm) and trusted publishing (PyPI), triggered manually (no automatic publishing). The drivers are at version 0.1.0 and under heavy development, with more languages planned (e.g., Go).