--- title: Langfuse icon: chart-line description: Set up the Langfuse resource in Python. --- ## Dependencies No additional dependencies - uses `aiohttp` (included). For credential setup, see the [Langfuse Setup](/home/setup/langfuse) guide. ## Configuration ```python import os from mirage import Workspace, MountMode from mirage.resource.langfuse import LangfuseConfig, LangfuseResource config = LangfuseConfig( public_key=os.environ["LANGFUSE_PUBLIC_KEY"], secret_key=os.environ["LANGFUSE_SECRET_KEY"], host=os.environ.get("LANGFUSE_HOST", "https://cloud.langfuse.com"), ) resource = LangfuseResource(config=config) ws = Workspace({"/langfuse/": resource}, mode=MountMode.READ) ``` ## Config Reference | Field | Required | Default | Description | | ------------ | -------- | ---------------------------- | ----------------------- | | `public_key` | Yes | | Langfuse public API key | | `secret_key` | Yes | | Langfuse secret API key | | `host` | No | `https://cloud.langfuse.com` | Langfuse API host URL |