> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lunary.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK Installation

Please use Python version 3.10 or higher to ensure compatibility.

```bash theme={null}
pip install lunary
```

If you want to monitor Anthropic with the official Python SDK, install both packages:

```bash theme={null}
pip install lunary anthropic
```

## Setup

Add the `LUNARY_PUBLIC_KEY` to your environment variables.

```bash theme={null}
export LUNARY_PUBLIC_KEY="PUBLIC KEY"
```

You can use dotenv to load the environment variables from a `.env` file.

```python theme={null}
from dotenv import load_dotenv
load_dotenv()
```

## Next steps

<CardGroup cols={2}>
  <Card title="LangChain" icon="box" href="/integrations/langchain">
    Usage with LangChain.
  </Card>

  <Card title="OpenAI" icon="microchip-ai" href="/integrations/python/openai">
    Automatically track your OpenAI calls.
  </Card>

  <Card title="Anthropic" icon="sparkles" href="/integrations/python/anthropic">
    Automatically track your Anthropic calls.
  </Card>

  <Card title="User Tracking" icon="users" href="/features/users">
    Identify your users.
  </Card>

  <Card title="Tagging" icon="tags" href="/features/tags">
    Segment your queries with tags.
  </Card>

  <Card title="Manual Integration" icon="code" href="/integrations/python/manual">
    Learn how to use track\_event().
  </Card>

  <Card title="Agents & Tools" icon="robot" href="/features/observability">
    Setup tracing by tracking agents & tools.
  </Card>

  <Card title="API Reference" icon="terminal" href="/api/introduction">
    Full list of methods and classes.
  </Card>
</CardGroup>
