Key-value commands

13 commands. Each entry gives the invocation and an example, in the interface you pick; open the details for parameters, return shape and error codes.

batch_delete

Delete multiple KV keys in one itemwise batch.

db.kv.delete_many(keys: 'Sequence[str | bytes]') -> 'BatchResult'

Deletes multiple KV keys and returns one positional mutation result per key. Missing keys are represented as no-op item results.

To see the complete help for this command, run:

help(db.kv.delete_many)

Example

_ = db.kv.put_many([{"key": "a", "value": "1"}, {"key": "b", "value": "2"}])_ = db.kv.delete_many(["a", "b"])db.kv.exists_many(["a", "b"])
View details →

batch_exists

Check existence for multiple KV keys.

db.kv.exists_many(keys: 'Sequence[str | bytes]') -> 'list[bool]'

Checks several KV keys and returns positional boolean status values. The response preserves the input order.

To see the complete help for this command, run:

help(db.kv.exists_many)

Example

_ = db.kv.put_many([{"key": "a", "value": "1"}])db.kv.exists_many(["a", "missing"])
View details →

batch_get

Read multiple KV values by key.

db.kv.get_many(keys: 'Sequence[str | bytes]') -> 'list[Optional[bytes]]'

Reads several KV keys and returns positional item results. Each item records whether the corresponding key was found and includes value metadata when present.

To see the complete help for this command, run:

help(db.kv.get_many)

Example

_ = db.kv.put_many([{"key": "a", "value": "1"}, {"key": "b", "value": "2"}])db.kv.get_many(["a", "b", "missing"])
View details →

batch_put

Store multiple KV values in one itemwise batch.

db.kv.put_many(entries: 'Any') -> 'BatchResult'

Writes multiple KV entries using the executor batch contract. Valid items share commit facts where the underlying engine applies them together.

To see the complete help for this command, run:

help(db.kv.put_many)

Example

_ = db.kv.put_many([{"key": "a", "value": "1"}, {"key": "b", "value": "2"}])db.kv.get_many(["a", "b"])
View details →

count

Count visible KV keys.

strata kv count

Counts visible KV keys in the selected branch and space, optionally constrained by a key prefix.

To see the complete help for this command, run:

strata kv count --help

Example

strata kv put a 1strata kv put b 2strata kv count
View details →

delete

Delete one visible KV key.

strata kv delete

Deletes the current visible value for a KV key. Missing keys produce a no-op delete acknowledgement rather than a read-style missing value.

To see the complete help for this command, run:

strata kv delete --help

Example

strata kv put temp scratchstrata kv delete tempstrata kv exists temp
View details →

exists

Check whether one KV key exists.

strata kv exists

Returns a boolean status for one KV key without loading the stored value.

To see the complete help for this command, run:

strata kv exists --help

Example

strata kv put k vstrata kv exists kstrata kv exists absent
View details →

get

Read the current or historical value for one KV key.

strata kv get

Reads one KV key from the selected branch and space. The optional timestamp reads the value visible at that point in time when history is retained.

To see the complete help for this command, run:

strata kv get --help

Example

strata kv put greeting hellostrata kv get greetingstrata kv get absent
View details →

history

Read retained version history for one KV key.

strata kv history

Returns retained history rows for a KV key when history is available. Missing or unavailable history maps to an optional-read result.

To see the complete help for this command, run:

strata kv history --help

Example

strata kv history absent
View details →

list

List KV keys with optional prefix filtering.

strata kv list

Lists visible KV keys in byte order. Prefix, cursor, limit, and timestamp parameters constrain the page returned by the executor.

To see the complete help for this command, run:

strata kv list --help

Example

strata kv put user:1 astrata kv put user:2 bstrata kv put other cstrata kv list --prefix user:
View details →

put

Store or replace a KV value by key.

strata kv put

Writes a binary value to the selected KV space. If the key already exists, Strata replaces the visible value and records a new version.

To see the complete help for this command, run:

strata kv put --help

Example

strata kv put setting v1strata kv put setting v2  # replaces the visible valuestrata kv get setting
View details →

sample

Sample visible KV rows.

strata kv sample

Returns a deterministic bounded sample of visible KV rows plus the total matching count.

To see the complete help for this command, run:

strata kv sample --help

Example

strata kv put a 1strata kv put b 2strata kv put c 3strata kv sample
View details →

scan

Scan KV rows with values and version facts.

strata kv scan

Scans visible KV rows starting at an optional key. Each item includes the key, value, and commit metadata exposed by the executor output.

To see the complete help for this command, run:

strata kv scan --help

Example

strata kv put a 1strata kv put b 2strata kv scan
View details →