BaseUserManagerConfig (configs/mem_user.py)

MemTensor/MemOS · src/memos/configs/mem_user.py · python · Apache-2.0
database

Provides a polymorphic configuration system for user management backends including SQLite, MySQL, and Redis using Pydantic.

# Source: https://github.com/MemTensor/MemOS | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from typing import Any, ClassVar

from pydantic import BaseModel, Field, field_validator, model_validator

from memos.configs.base import BaseConfig


class BaseUserManagerConfig(BaseConfig):
    """Base configuration class for user managers."""

    user_id: str = Field(default="root", description="Default user ID for initialization")


class SQLiteUserManagerConfig(BaseUserManagerConfig):
    """SQLite user manager configuration."""

    db_path: str | None = Field(
        default=None,
        description="Path to SQLite database file. If None, uses default path in MEMOS_DIR",
    )


c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key