Quickstart
Version scope: Python 0.0.12 / JavaScript 0.5.4. Entity keys, progressive geometry, structured ragged/CSR and additional index capabilities are included in these releases. See feature examples and limits for the supported boundaries; older packages may not expose these methods.
Reading takes three lines and no credentials. Writing takes a backend that can PUT. Both are below, and both were run against the published package.
Read and query
Point Space.fromUri at a ref. Passing null for the backend uses plain fetch against the URI's base, which is all a readable bucket needs:
A vector query takes the field name, a Float32Array, and options:
Anchors identify records. To turn them into values, read a scalar column — it comes back as a Map keyed by the anchor as a string:
Or go the other way, from a value to its anchors:
Don't have a dataset yet? The Quick Start writes one to a local directory with Python in about twenty lines, then serves it over HTTP — which is exactly the http://localhost:8791 above.
Write
Writing needs a backend object with put. The bundled S3Backend is read-only, and the write entry points say so rather than failing later:
For a server-side script, a fetch wrapper is enough. This one talks to MinIO:
Then create a dataset and append to it. Fields are declared as plain objects, and each sample names its field types:
Nothing is visible to a reader until commit(). That call is what advances the ref, with a compare-and-swap against its current ETag.
To append to a dataset that already exists, skip Authoring entirely:
Writer is in the browser build too. Authoring is not — see Overview.
Next
- API reference — every method, with what it returns
- Browser usage — rendering stored images, and writing without shipping credentials
- Storage backends — MinIO, S3, R2, and the CORS rules