surrealdb-python
Skill29 starsChanged 8 days agoMITView on GitHub
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://.
- Installs packages
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- martinschaer/create-surrealdb-pocword for word, first seen Nov 22, 2026
- Quad4-Software/skillsedited, first seen Oct 3, 2026
Other versions2 projects use a version of this.
Word for word · 1
- martinschaer/create-surrealdb-poc★ 2100% same
Edited · 1
- Quad4-Software/skills★ 144% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- surrealdb-agent-memory-docsSkill
- surrealdb-cliSkill
- surrealdb-docsSkill
- surrealdb-jsSkill
- surrealdb-vectorSkill
- surrealkitSkill
- surrealql-functionsSkill
- surrealql-performanceSkill
- surrealqlSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 97
Run SurrealDB directly inside your Python process — no server required.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SurrealDB Python SDK
Running SurrealDB (Server Mode)
Persist data with RocksDB:
surreal start -u root -p root rocksdb:databaseIn-memory:
surreal start -u root -p rootClient/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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

