Python SDK reference

Package layout and configuration for surrealdb-spectron.

ItemValue
PyPI packagesurrealdb-spectron
Installpip install surrealdb-spectron
VariablePurpose
SPECTRON_URLBase URL (no trailing slash), e.g. http://localhost:9090
SPECTRON_API_KEYContext API key
SPECTRON_CONTEXT_IDPath segment after /api/v1/
API-KEY: <key>
SDK areaHTTP
FactsPOST /api/v1/{ctx}/facts, POST .../facts/batch
Query / contextPOST .../query, POST .../context
ChatPOST .../chat
DocumentsPOST/GET/DELETE .../documents
SessionsPOST/GET/DELETE .../sessions
EntitiesGET/DELETE .../entities/{type}/{name}
Reflect / forgetPOST .../reflect, POST .../forget

Full tables: REST API.

See Python SDK for usage patterns and harness adapters.

Was this page helpful?