Skip to content

API Reference parrot.storage.backends

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.storage.backends

View source

Pluggable ConversationBackend factory and re-exports.

Use build_conversation_backend() to get the backend specified by PARROT_STORAGE_BACKEND. See wiki/stores/storage-backends.md for the full backend selection matrix and environment variable reference.

FEAT-116: dynamodb-fallback-redis — Module 7 (factory + config wiring).

Alias ConversationBackend

Re-exported from parrot.storage.backends.base.ConversationBackend.

Alias ConversationDynamoDB

Re-exported from parrot.storage.backends.dynamodb.ConversationDynamoDB.

Alias ConversationMongoBackend

Re-exported from parrot.storage.backends.mongodb.ConversationMongoBackend.

Alias ConversationPostgresBackend

Re-exported from parrot.storage.backends.postgres.ConversationPostgresBackend.

Alias ConversationSQLiteBackend

Re-exported from parrot.storage.backends.sqlite.ConversationSQLiteBackend.

Alias OverflowStore

Re-exported from parrot.storage.overflow.OverflowStore.

Function build_conversation_backend

Instantiate the backend specified by PARROT_STORAGE_BACKEND.

Imports from parrot.conf are deferred inside the function body to avoid circular import issues between conf.py ← storage ← backends.

build_conversation_backend(override: Optional[str] = None) -> ConversationBackend

Parameter Type Default Description
override Optional[str] None Override the env-var value for this call only (used in tests).

Returns: ConversationBackend — An uninitialised ConversationBackend instance. Call await backend.initialize() before using it.

Raises:

  • ValueError — If the backend name is unknown.
  • RuntimeError — If a required DSN is not configured.

Function build_overflow_store

Instantiate the overflow store specified by PARROT_OVERFLOW_STORE.

build_overflow_store(override: Optional[str] = None) -> OverflowStore

Parameter Type Default Description
override Optional[str] None Override the env-var value for this call only.

Returns: OverflowStore — An OverflowStore wrapping the appropriate FileManagerInterface.

Raises:

  • ValueError — If the overflow store name is unknown.

Function load_metrics_from_path

Import and return a StorageMetrics instance from a module path.

load_metrics_from_path(path: str) -> StorageMetrics

Parameter Type Default Description
path str Module path in "module.name:attribute" format.

Returns: StorageMetrics — The StorageMetrics instance at the given path.

Raises:

  • RuntimeError — If the path is malformed or the import fails.

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