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

# Python SDK

> Install the Leadping Python SDK from PyPI, configure Kiota authentication, create a request adapter, and call Leadping API endpoints.

* Package: [leadping on PyPI](https://pypi.org/project/leadping/)
* Repository: [leadpingai/leadping-python](https://github.com/leadpingai/leadping-python)

## Install

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

Install a Kiota HTTP adapter in the application that will call Leadping:

```bash theme={null}
pip install microsoft-kiota-http
```

## Create a client

The SDK exports `LeadpingOpenApiClient`. For most SDK integrations, pass it a Kiota request adapter that attaches `Authorization: Bearer lp_...`. Use `Authorization: Bearer <leadping_user_access_token>` only when acting as a signed-in user, and use `Authorization: Bearer lp_src_...` only when intentionally calling lead ingestion endpoints.

```python theme={null}
from leadping import LeadpingOpenApiClient

request_adapter = create_leadping_request_adapter()
client = LeadpingOpenApiClient(request_adapter)

me = await client.users.me.get()
```

`create_leadping_request_adapter` is your application code. The generated SDK does not own token storage or API key handling.

## Common calls

```python theme={null}
source = await client.sources.by_id("source-id").get()
lead = await client.leads.by_id("lead-id").get()
current_user = await client.users.me.get()
```

Use generated request body classes from the `leadping` package when creating or updating records.
