Application Settings Models (mirix/settings.py)

MIRIX · infra, Infra / DevOps, settings, pydantic, environment, config, dotenv

Centralised settings classes using Pydantic Settings for tool, summarizer, model, and test configuration, loading from .env.

# Source: https://github.com/mperkins0155/MIRIX | 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.
import sys
from pathlib import Path
from typing import Optional

from dotenv import load_dotenv
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict

# Load .env file if it exists before initializing settings
# This ensures environment variables from .env are available when settings are instantiated
load_dotenv()


class ToolSettings(BaseSettings):
    composio_api_key: Optional[str] = None

    # E2B Sandbox configurations
    e2b_api_key: Optional[str] = None
    e2b_sandbox_template_id: Optional[str] = None  # Updated manually

    # Local Sandbox 

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

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

Get a free API key