Skip to main content

SDK & REST

Use the TypeScript SDK, Python SDK, or REST API when RushDB is part of your application, service, script, or data pipeline.

The fastest useful test is a nested import followed by a search. Nested objects become linked records automatically.

Install, Connect, and Write

pip install rushdb
from rushdb import RushDB

db = RushDB("RUSHDB_API_KEY")

db.records.create_many(
label="PROJECT",
data={
"name": "RushDB adoption",
"TASK": [
{"title": "Connect RushDB", "status": "done"},
{"title": "Query linked records", "status": "pending"},
],
},
)

Verify with a Read

projects = db.records.find({
"labels": ["PROJECT"],
"where": {"name": "RushDB adoption"},
})

print(projects.total, projects.data)

Self-Hosted Instance

db = RushDB("RUSHDB_API_KEY", url="https://your-rushdb.example.com")

Semantic search requires a one-time embedding index for the label and text property you want to search. After the first write/read flow works:

  1. Create an embedding index.
  2. Wait until the index status is ready.
  3. Run semantic search.

Full References