Klozeo Python SDK
Official Python client for the Klozeo Lead Management API.
Installation
pip install klozeo
Requires Python 3.10+.
Quick Start
from klozeo import Klozeo, Lead
client = Klozeo("sk_live_your_api_key")
# Create a lead
resp = client.create(Lead(
name="Acme Corporation",
source="website",
city="San Francisco",
email="contact@acme.com",
rating=4.5,
tags=["enterprise", "saas"],
))
print(f"Created: {resp.id}")
# List with filters
from klozeo import city, rating, SortField, SortOrder
result = client.list(
city().eq("Berlin"),
rating().gte(4.0),
sort_by=SortField.RATING,
sort_order=SortOrder.DESC,
limit=20,
)
for lead in result.leads:
print(f"{lead.name} — score: {lead.score}")
# Paginate automatically
for lead in client.iterate(city().eq("Berlin")):
print(lead.name)
Async Client
import asyncio
from klozeo import AsyncKlozeo, Lead
async def main():
async with AsyncKlozeo("sk_live_your_api_key") as client:
resp = await client.create(Lead(name="Acme", source="website"))
async for lead in client.iterate(city().eq("Berlin")):
print(lead.name)
asyncio.run(main())
Error Handling
from klozeo import NotFoundError, RateLimitedError, ForbiddenError, KlozeoError
try:
lead = client.get("cl_nonexistent")
except NotFoundError:
print("Lead not found")
except RateLimitedError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except ForbiddenError:
print("Leads limit reached — upgrade your plan")
except KlozeoError as e:
print(f"HTTP {e.status_code}: {e.message}")
Links
- Documentation: https://docs.klozeo.com
- API Reference: https://docs.klozeo.com/api/leads
- PyPI: https://pypi.org/project/klozeo
Metadata
Release files for klozeo 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| klozeo-0.1.3.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| klozeo-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.7 kB
Release files / klozeo-0.1.3.tar.gz
| Download URL | klozeo-0.1.3.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e67525266b5c8f20b95f95c0f7a8f4119131eae3a8a8753aa29b4967cb5b7a3d
|
|
BLAKE2b-256 checksum How to use checksums |
6467fc4b2819fe4b9a9fd6bf353c93d9eebf247c579948c7d39fd692200fbc1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logRelease files / klozeo-0.1.3-py3-none-any.whl
| Download URL | klozeo-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d05c3e10cb630e879d49398b59d905ee2bc23af184bf3e15221d64a58c72ae76
|
|
BLAKE2b-256 checksum How to use checksums |
b7f72c86d42cd734851df5dba0e5d7d18e9e370a71e25623773ee3fe4e74a69e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency log