> Reverse Contact API documentation. This is the Markdown copy of https://docs.reversecontact.com/sdk/python/install
> Every page is listed at https://docs.reversecontact.com/llms.txt, every endpoint with its credit cost and status at https://docs.reversecontact.com/catalog.json

# Install and configure

> Install the Reverse Contact Python SDK, configure your API key, and create sync or async clients with Python 3.11 or later and typed responses.

- Last verified: 2026-11-04

`reversecontact` is the official Python client for the Reverse Contact API, distributed under the Apache-2.0 license. These pages describe the published 0.3.0 package.

## Runtime requirements

The SDK needs Python 3.11 or later, with `httpx>=0.27,<1` and `pydantic>=2.7,<3`. The package includes type hints for mypy and your editor.

- Package: [reversecontact on PyPI](https://pypi.org/project/reversecontact/)
- Source code and issues: [reversecontact-python on GitHub](https://github.com/visum-run/reversecontact-python)

## Install

**Install**

```bash [pip]
pip install reversecontact
```
```bash [uv]
uv add reversecontact
```
```bash [Poetry]
poetry add reversecontact
```

## API key

Pass your API key to the client as `api_key`, or set the `RC_API_KEY` environment variable. When you omit `api_key`, the client reads `RC_API_KEY`.

The examples in these guides use the environment variable. You can use any server-side source, such as a secret manager. If you serve several workspaces, create one client per key. Keep the key on your server, out of your code and anything a browser loads. See [Authentication](https://docs.reversecontact.com/authentication) to create a key.

**Terminal**

```bash [Terminal]
export RC_API_KEY="your-api-key"
```

## Create and close a client

Use a context manager to close the SDK's HTTP connection pool when your work ends. With `RC_API_KEY` set, create the client without passing a key:

**Python SDK**

```python [Python SDK]
from reversecontact import ReverseContact

with ReverseContact() as client:
    print(client.usage.retrieve().quotas)
```

You can also pass the key explicitly with `ReverseContact(api_key=your_server_side_key)`, then call `client.close()` when finished. A missing or empty key raises `ReverseContactError` before the SDK sends an HTTP request. The SDK sends the key in an `Authorization: Bearer` header.

For asyncio applications, use `async with AsyncReverseContact()` or `await client.close()`. See the example in [Async client](https://docs.reversecontact.com/sdk/python/async-client).

Close any custom `http_client` yourself. [Client options](https://docs.reversecontact.com/sdk/python/client-options) covers base URLs, connection pools, logging and per-client defaults. Once your client is configured, make your [first call](https://docs.reversecontact.com/sdk/python/first-call).

Return to the [Python SDK overview](https://docs.reversecontact.com/sdk/python).

## FAQ

### Which Python versions does reversecontact support?

The `reversecontact` package requires Python 3.11 or later, httpx 0.27 or later below 1, and Pydantic 2.7 or later below 3.

### How do I set the API key for the Python SDK?

Set the `RC_API_KEY` environment variable or pass `api_key` to `ReverseContact` or `AsyncReverseContact`. Keep the key on your server.

### Do I need to close the Python SDK client?

Use `with ReverseContact()` or `async with AsyncReverseContact()` to close the SDK-owned connection pool. Close any custom `http_client` yourself.
