Skip to content

API Reference parrot.userstore.copy

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

parrot.userstore.copy

View source

Copy user-store documents from DocumentDB into Redis (FEAT-878).

Sealed values are copied verbatim and are not re-sealed.

Usage::

python -m parrot.userstore.copy --dry-run
python -m parrot.userstore.copy
python -m parrot.userstore.copy --collections user_credentials,user_llm_keys --overwrite

Alias CollectionSpec

Re-exported from parrot.userstore.collections.CollectionSpec.

Class CopyReport

Per-collection counts produced by a copy operation.

Parameter Type Default Description
copied dict[str, int] dict()
skipped dict[str, int] dict()
duplicates dict[str, int] dict()
failed dict[str, int] dict()

Fields:

Field Type Default Description
copied dict[str, int] field(default_factory=dict)
skipped dict[str, int] field(default_factory=dict)
duplicates dict[str, int] field(default_factory=dict)
failed dict[str, int] field(default_factory=dict)

Attributes:

Attribute Type Description
any_failed bool Return whether at least one source document failed to copy.

Alias DocumentDb

Re-exported from parrot.interfaces.documentdb.DocumentDb.

Alias RedisDocumentStore

Re-exported from parrot.userstore.redis_documents.RedisDocumentStore.

Alias USER_STORE_COLLECTIONS

Re-exported from parrot.userstore.collections.USER_STORE_COLLECTIONS.

Function copy_to_redis

Copy selected collections, defaulting to every registered user-store collection.

copy_to_redis(collections: Sequence[str] | None = None, *, dry_run: bool = False, overwrite: bool = False) -> CopyReport

Parameter Type Default Description
collections Sequence[str] | None None
dry_run bool False
overwrite bool False

Returns: CopyReport

Attribute logger

Function main

Run the copy CLI and return 1 on document failures or 2 on bad arguments.

main(argv: list[str] | None = None) -> int

Parameter Type Default Description
argv list[str] | None None

Returns: int

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