A Python library for interacting with SurrealDB via RPC.
Project description
SurrealDB RPC Python Client
Example Usage
from surrealdb_rpc.client.websocket import SurrealDBClient
from surrealdb_rpc.data_model import RecordId
with SurrealDBClient(
host="localhost",
port=8000,
ns="test",
db="test",
user="root",
password="root",
) as db:
response = db.create(
"example:123",
text="Some value",
reference=RecordId.new("other", {"foo": {"bar": "baz"}}),
array=[1, 2, 3],
object={"key": "value"},
)
print(response)
This should create this record in the database:
{
array: [
1,
2,
3
],
id: example:123,
object: {
key: 'value'
},
reference: other:{
foo: {
bar: 'baz'
}
},
text: 'Some value'
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
surrealdb_rpc-0.1.0.tar.gz
(21.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file surrealdb_rpc-0.1.0.tar.gz.
File metadata
- Download URL: surrealdb_rpc-0.1.0.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad29e72b062837d77f17312624c9f4d8c6353d2ce8b7e6c6a90e052d1dc0fa48
|
|
| MD5 |
2e1673efe36d724a69f85610f8a19748
|
|
| BLAKE2b-256 |
6251461d1ae0c2e22141c32a55fc24fc799c71d769fbd364a5fd2531644d0ba3
|
File details
Details for the file surrealdb_rpc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: surrealdb_rpc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f1bc7e04db030a70579b55e08b6cc34ae4da2c4f1e076d58961f60c9f3385a3
|
|
| MD5 |
737c556d37b566e76014fbbcc384e7e4
|
|
| BLAKE2b-256 |
01937490d5417fbace4c261e1c038a73738aaffcf235716529c3c49be1b1df9d
|