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.2.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.2.tar.gz.
File metadata
- Download URL: surrealdb_rpc-0.1.2.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 |
3840aba696b8029c2966e85a57de2be64dd489e78ed68656f5e772c67e3d345a
|
|
| MD5 |
4be58d3967d3216dc7fff6a1339e44ae
|
|
| BLAKE2b-256 |
0d842e086a38b937bd57c288e2533d0d101bb42b9d5f71b1e99306ced77e27fa
|
File details
Details for the file surrealdb_rpc-0.1.2-py3-none-any.whl.
File metadata
- Download URL: surrealdb_rpc-0.1.2-py3-none-any.whl
- Upload date:
- Size: 23.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 |
aea39bcfc72ae8b07b0c668ac30b5429484123e8b4f07225e19f3348bc0d5647
|
|
| MD5 |
10c671588661f4dd7ade74433f518575
|
|
| BLAKE2b-256 |
2cf38092cabb397fbde9443837157c35cb4afe0aec2810eacd3bb190bbc748cb
|