Skip to content

API Reference parrot.bots.flows.core.gates.stores.redis

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.bots.flows.core.gates.stores.redis

View source

Redis gate store (FEAT-890 M2).

Alias GateRecord

Re-exported from parrot.bots.flows.core.gates.models.GateRecord.

Alias GateStatusValue

Re-exported from parrot.bots.flows.core.gates.models.GateStatusValue.

Class RedisGateStore

GateStore over an async Redis client.

Parameter Type Default Description
client Any
prefix str 'parrot:gates'

Method RedisGateStore.put

Write the record and maintain pending sets (global + per owner).

put(record: GateRecord) -> None

Parameter Type Default Description
record GateRecord

Method RedisGateStore.compare_and_put

Write record iff the stored record has expected_status, in one server-side Lua script.

The script also maintains the global and per-owner pending sets, so the record and its indexes change together.

compare_and_put(record: GateRecord, *, expected_status: GateStatusValue) -> bool

Parameter Type Default Description
record GateRecord The new state of the gate.
expected_status GateStatusValue Status the stored record must currently have.

Returns: bool — True when the record was written; False when it is missing or its status differs.

Method RedisGateStore.get

Return the record or None.

get(gate_id: str) -> GateRecord | None

Parameter Type Default Description
gate_id str

Returns: GateRecord | None

Method RedisGateStore.pending

Return pending records, optionally for one owner, ordered by opened_at.

pending(owner: str | None = None) -> list[GateRecord]

Parameter Type Default Description
owner str | None None

Returns: list[GateRecord]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally