surrealdb-pythonlisted
Install: claude install-skill aiskillstore/marketplace
# SurrealDB Python
## Overview
SurrealDB is a multi-model database that combines document, graph, and vector search capabilities in a single system. This skill provides comprehensive guidance for working with SurrealDB 2.3.x using the Python SDK, covering standard database operations, graph relationships, vector similarity search, and real-time data subscriptions.
## When to Use This Skill
Apply this skill when:
- Setting up SurrealDB connections and performing CRUD operations
- Implementing graph databases with the RELATE statement and traversal queries
- Building semantic search or RAG (Retrieval-Augmented Generation) applications with vector embeddings
- Creating real-time applications with live queries
- Designing multi-model schemas that combine documents, graphs, and vectors
## Core Capabilities
### 1. Connection and Authentication
Establish connections to SurrealDB using the Python SDK with proper authentication:
```python
from surrealdb import AsyncSurreal
async with AsyncSurreal("ws://localhost:8000/rpc") as db:
await db.signin({"user": "root", "pass": "root"})
await db.use("namespace", "database")
# Perform operations
```
### 2. CRUD Operations
Perform standard database operations using intuitive Python methods:
- **create()** - Insert new records with specific or auto-generated IDs
- **select()** - Retrieve single records or entire tables
- **update()** - Replace entire record contents
- **merge()** - Partially update records by merging new