> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Python SDK

Install, authenticate, and make your first request with the official Paddle Python SDK.

---

The Paddle Python SDK integrates Paddle Billing with Python applications. It handles pagination automatically, exposes operation classes for creates and updates, and includes a webhook signature verifier that works with Flask, Django, and anything speaking the request protocol.

{% version-badge sdk="paddle-python" /%}

{% card-group cols=3 %}
{% card title="GitHub" icon="carbon:logo-github" url="https://github.com/PaddleHQ/paddle-python-sdk" %}
View source code and report issues on GitHub.
{% /card %}
{% card title="PyPI package" icon="devicon-plain:pypi" url="https://pypi.org/project/paddle-python-sdk/" %}
View and install on PyPI.
{% /card %}
{% card title="Changelog" icon="carbon:bullhorn" url="https://github.com/PaddleHQ/paddle-python-sdk/blob/main/CHANGELOG.md" %}
See recent releases and changes.
{% /card %}
{% /card-group %}

## Requirements

Python 3.11 or later.

## Install

{% code-group sync="python-package-manager" %}

```bash {% title="pip" %}
pip install paddle-python-sdk
```

```bash {% title="poetry" %}
poetry add paddle-python-sdk
```

```bash {% title="uv" %}
uv add paddle-python-sdk
```

{% /code-group %}

## Authenticate

Create an API key in **Paddle > Developer tools > Authentication**, then pass it when you construct the client.

API keys are environment-specific. Use a sandbox key for sandbox, a live key for production.

```python
from os import getenv
from paddle_billing import Client, Environment, Options

paddle = Client(
    getenv('PADDLE_API_KEY'),
    options=Options(Environment.SANDBOX),
)
```

Omit the `options` argument, or use `Environment.PRODUCTION`, to use the live API.

## Make your first request

List the products in your catalog:

```python
from os import getenv
from paddle_billing import Client, Environment, Options

paddle = Client(
    getenv('PADDLE_API_KEY'),
    options=Options(Environment.SANDBOX),
)

products = paddle.products.list()

for product in products:
    print(product.id, product.name)
```

`paddle.products.list()` returns an iterator. Iterating with `for ... in` walks every page automatically. The SDK fetches the next page when the current one is exhausted.

## Next steps

- Understand [shared patterns](https://developer.paddle.com/sdks/libraries.md) for pagination, idempotency, retries, and error handling across SDKs.
- Browse the [API reference](https://developer.paddle.com/api-reference/overview.md) for every resource and operation the SDK exposes.
- Work against [sandbox](https://developer.paddle.com/sdks/sandbox.md) while you build, then follow the [go-live checklist](https://developer.paddle.com/build/onboarding/go-live-checklist.md) to switch environments.