A Python library for interacting with SurrealDB via RPC.
Project description
SurrealDB RPC Python Client
Example Usage
from surrealdb_rpc.client.websocket import SurrealDBWebsocketClient
from surrealdb_rpc.data_model import Thing
with SurrealDBWebsocketClient(
host="localhost",
port=8000,
ns="test",
db="test",
user="root",
password="root",
) as db:
response = db.create(
"example:123",
text="Some value",
reference=Thing("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.3.3.tar.gz
(51.1 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.3.3.tar.gz.
File metadata
- Download URL: surrealdb_rpc-0.3.3.tar.gz
- Upload date:
- Size: 51.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb15dd491de928c1997d36c5814b1afb53c8760beb12eee86129c2a6915915d
|
|
| MD5 |
c31694ea3c8baca1a0c8b3b4df71f70f
|
|
| BLAKE2b-256 |
d32429495f33ae8c16c3e0f75e12688dc3f877657808464aa079d1401da3a4ca
|
File details
Details for the file surrealdb_rpc-0.3.3-py3-none-any.whl.
File metadata
- Download URL: surrealdb_rpc-0.3.3-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d0cca6fc413c10004ae3357585a1e86310f0138f8ff9b2566c22d458c456f9
|
|
| MD5 |
10c146778df2bbda4d7ae1311a62e919
|
|
| BLAKE2b-256 |
6a6a017ce76abaabe7e58b68b22f0dbf53981342e721a0f37b29297eecdaa210
|