Skip to main content

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'
}

Metadata

Release files for surrealdb-rpc 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for surrealdb-rpc 0.3.6
File Size Uploaded
surrealdb_rpc-0.3.6.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for surrealdb-rpc 0.3.6
File Interpreter ABI Platform
surrealdb_rpc-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / surrealdb_rpc-0.3.6.tar.gz

Download URL surrealdb_rpc-0.3.6.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d5ec92ba798f4ed0a69170d92b8c1ad33ba172890c15dcea8cf5c9aa589cc6e8
BLAKE2b-256 checksum
How to use checksums
378771ec1196ac6853360b9d38c93d4e1b32377cadc3b3ddf9c30891718dc593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.2

Release files / surrealdb_rpc-0.3.6-py3-none-any.whl

Download URL surrealdb_rpc-0.3.6-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc437a8cf62e9753e7c384afe1718aabff7709332d9943469d3eee4095807b4e
BLAKE2b-256 checksum
How to use checksums
3dcf3fdbce488d18ac84efbc301b7a75046ecce71a2e87d1bc8ae4b9d836710b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page