Skip to main content

Install

Prepare the example

Use Python 3.10 or later and install packages in your application’s virtual environment. Set LEADPING_API_KEY to an organization key and replace lead-id with a record from that organization. Save the example as read_lead.py and run python read_lead.py. The client is asynchronous. The example supplies an event loop with asyncio.run; inside an application that already runs an event loop, await the request from your existing async function instead.

Create the client

The client defaults to https://api.leadping.ai. Set LEADPING_API_KEY to an organization API key. client.users.me requires a user access token; source keys are only for lead intake. The SDK does not store or refresh credentials. See API Authentication.

Read other resources

Use generated request-body and model classes from leadping when creating or updating records. Confirm endpoint contracts in the API Reference, and handle 429 responses using the rate-limit guide. Keep that call inside an async function. Await requests before inspecting their result, and let your application’s error handler distinguish access errors from a missing optional field. In a long-running application, manage the underlying HTTP client’s lifetime with the application rather than creating a new client for every record.