A Python library for interacting with SurrealDB via RPC.
Project description
SurrealDB RPC Python Client
Example Usage
from surrealdb_rpc.client.websocket.surrealdb 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.2.1.tar.gz
(25.4 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.2.1.tar.gz.
File metadata
- Download URL: surrealdb_rpc-0.2.1.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
600600c3c492dd0f1d30d9474cd513a1512691a824ff66c43bb92e4f706d527c
|
|
| MD5 |
1b44a2975c8ba496644387cfe0f0e4d9
|
|
| BLAKE2b-256 |
2c940521f6e34ff9474ca82d313ecc28c18a4ad973a94afe564d4d50f3993437
|
File details
Details for the file surrealdb_rpc-0.2.1-py3-none-any.whl.
File metadata
- Download URL: surrealdb_rpc-0.2.1-py3-none-any.whl
- Upload date:
- Size: 30.5 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 |
eef0227c8dfd402f7e5b5af90cca2df8c4965ff030cd0ef3b0dd181d951b881d
|
|
| MD5 |
15e8e6c8ba878de5977d0841dc1d4753
|
|
| BLAKE2b-256 |
45ed6c4e822bd9df58100f7a260b1277dd31c8241930295034926817e4cd8858
|