surrealdb
SurrealDB python client
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is actively maintained, supports current Python versions (3.10–3.13), and offers both embedded and remote modes for flexibility. However, verify the license terms before use—the metadata does not specify a license, which is a blocker for some projects. No known security vulnerabilities. Install if you are committed to SurrealDB and need a Python client; avoid if license ambiguity is a dealbreaker.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running SurrealDB instance (local or remote) or use embedded mode with "memory" or "file://" URIs.
- Python 3.10+ required.
- Medium install friction due to compiled wheels for multiple platforms (cp39-abi3 across macOS, Linux, Windows).
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text provided in package metadata. Verify the actual license terms before adopting in proprietary or restricted contexts.
last release 2026-04-23 (113 days) · last repo commit 2026-08-14 · 265 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 151,436 downloads/mo, #10,933 on PyPI
Alternatives
Verify before relying
pip install surrealdb
from surrealdb import Surreal
with Surreal("ws://localhost:8000/rpc") as db:
db.signin({"username": "root", "password": "root"})
db.use("namespace", "database")
db.create("person", {"name": "Alice"})
print(db.select("person"))- Whether the package's license is compatible with your project's license requirements (license metadata missing).
- Performance characteristics and scalability limits for embedded vs. remote connections under production load.
- Support status and backward compatibility guarantees for the 2.0.0 release.
What it is and what it does
surrealdb is the official Python SDK for SurrealDB, a multi-model database that can run as a remote server or embedded directly in your application. It provides both synchronous (Surreal) and asynchronous (AsyncSurreal) APIs for connecting to SurrealDB instances via WebSocket, HTTP, or embedded modes (in-memory or file-based). The package handles authentication, namespace/database selection, and CRUD operations through methods like create(), select(), update(), delete(), and query() for raw SurrealQL.
The SDK depends on aiohttp, requests, websockets, pydantic-core, and typing-extensions to manage network communication and data validation. It supports sessions and transactions on WebSocket connections, and integrates with Pydantic Logfire for observability. Embedded mode is useful for development, testing, and single-application deployments, while remote connections suit multi-application or distributed scenarios.
Use it for
- Build a Python desktop or CLI application with local data storage using embedded in-memory or file-based SurrealDB.
- Develop an async web service that connects to a remote SurrealDB instance via WebSocket for real-time data operations.
- Write integration tests that use in-memory SurrealDB to avoid external dependencies and run tests quickly.
- Implement multi-session transactions on a WebSocket connection for complex, coordinated database operations.
- Add observability to database interactions by instrumenting SurrealDB operations with Pydantic Logfire.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is actively maintained, supports current Python versions (3.10–3.13), and offers both embedded and remote modes for flexibility. However, verify the license terms before use—the metadata does not specify a license, which is a blocker for some projects. No known security vulnerabilities. Install if you are committed to SurrealDB and need a Python client; avoid if license ambiguity is a dealbreaker.
Install
surrealdb on PyPI
Before you install
Medium install friction due to compiled wheels for multiple platforms (cp39-abi3 across macOS, Linux, Windows). Active maintenance with recent release (113 days old) and ongoing commits. Requires Python 3.10 or later.
Requires a running SurrealDB instance (local or remote) or use embedded mode with "memory" or "file://" URIs. Python 3.10+ required.
License in practice
License status is unclear—no SPDX identifier or raw license text provided in package metadata. Verify the actual license terms before adopting in proprietary or restricted contexts.
Quickstart
pip install surrealdb
from surrealdb import Surreal
with Surreal("ws://localhost:8000/rpc") as db:
db.signin({"username": "root", "password": "root"})
db.use("namespace", "database")
db.create("person", {"name": "Alice"})
print(db.select("person"))
Verify before relying
- Whether the package's license is compatible with your project's license requirements (license metadata missing).
- Performance characteristics and scalability limits for embedded vs. remote connections under production load.
- Support status and backward compatibility guarantees for the 2.0.0 release.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 5 packagesaiohttppydantic-corerequeststyping-extensionswebsockets |
| Maintenance | Actively maintained 113 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 151,436 / month, #10,933 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: DatabaseTopic :: Database :: Database Engines/ServersTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: surrealdb-2.0.0-cp39-abi3-macosx_10_12_x86_64.whl; surrealdb-2.0.0-cp39-abi3-macosx_11_0_arm64.whl; surrealdb-2.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; surrealdb-2.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; surrealdb-2.0.0-cp39-abi3-musllinux_1_2_aarch64.whl; surrealdb-2.0.0-cp39-abi3-musllinux_1_2_x86_64.whl; surrealdb-2.0.0-cp39-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “surrealdb python client”
- surrealdbOfficial Python client for SurrealDB, supporting both remote…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- openapi-python-clientGenerates type-annotated Python HTTP clients from OpenAPI 3.0 and 3.1…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pinotdb · libsql-client · centrifuge-python · databend-driver · opentelemetry-instrumentation-psycopg2 · singlestoredb · ibmcloudant · questdb · logfire · opentelemetry-instrumentation-pymssql