surrealdb-python
БесплатноБез исполняемых скриптовНе проверенUsing SurrealDB with the Python SDK, covering both client/server mode (WebSocket) and embedded mode (in-memory or file-based). Use when connecting to…
от surrealdb★ 29 звёзд на GitHubОб этом скилле
SurrealDB Python SDK
Running SurrealDB (Server Mode)
Persist data with RocksDB:
surreal start -u root -p root rocksdb:database
In-memory:
surreal start -u root -p root
Client/Server Mode
Connect via WebSocket using the Surreal context manager:
from surrealdb import Surreal
with Surreal("ws://localhost:8000/rpc") as db:
db.signin({"username": "root", "password": "root"})
db.use("namespace_test", "database_test")
db.create(
"person",
{
"user": "me",
"password": "safe",
"marketing": True,
"tags": ["python", "documentation"],
},
)
print(db.select("person").execute())
print(db.update("person", {
"user": "you",
"password": "very_safe",
"marketing": False,
"tags": ["Awesome"],
}))
print(db.delete("person").execute())
db.query("""
insert into person {
user: 'me',
password: 'very_safe',
tags: ['python', 'documentation']
};
""").execute()
print(db.query("select * from person").execute())
print(db.query("""
update person content {
user: 'you',
password: 'more_safe',
tags: ['awesome']
};
""").execute())
print(db.query("delete person").execute())
Builders and .execute()
query(), select(), delete() and the no-data forms of create() /
insert() return a builder. With the sync client, nothing is sent until
you call .execute() (or iterate the builder); a dropped builder is a silent
no-op and emits a RuntimeWarning. create() / update() with a data
argument run immediately. With AsyncSurreal, await the call instead
(await db.query(...)), and .execute() also works.
query() returns a list with one result per statement, even for a single
statement. .first() runs the query and returns just the first statement's
result:
people = db.query("select * from person").first()
Embedded Mode
Run SurrealDB directly inside your Python process — no server required.
Install with pip install "surrealdb[embedded]".
- In-memory:
Surreal("mem://")/AsyncSurreal("mem://") - File-based persistence:
Surreal(f"file://{db_path}")/AsyncSurreal(f"file://{db_path}")
See references/embedded.md for a complete async example with file-based persistence.
Установить surrealdb-python в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл surrealdb-python?
Using SurrealDB with the Python SDK, covering both client/server mode (WebSocket) and embedded mode (in-memory or file-based). Use when connecting to SurrealDB from Python, using the surrealdb Python package, running SurrealDB embedded without a server, or performing CRUD operations from Python code. Triggers: surrealdb Python, Surreal(), AsyncSurreal(), Python SDK, embedded SurrealDB, mem://, file://.
Как установить скилл surrealdb-python?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл surrealdb-python запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic