Official Python SDK for the Klozeo Lead Management API
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klozeo-0.1.2.tar.gz.
File metadata
- Download URL: klozeo-0.1.2.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23d012abdd781009386f2df14c105026cc469d71a3e6d7d21b7d7d3902bfd91c
|
|
| MD5 |
ba0a869683f49b7d350c639c9712c666
|
|
| BLAKE2b-256 |
2150c76a78e376290477797aefc8e48c543d14c30c12387094782cd389eac0ac
|
Provenance
The following attestation bundles were made for klozeo-0.1.2.tar.gz:
Publisher:
release.yml on lbframe/klozeo-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
klozeo-0.1.2.tar.gz -
Subject digest:
23d012abdd781009386f2df14c105026cc469d71a3e6d7d21b7d7d3902bfd91c - Sigstore transparency entry: 1304341667
- Sigstore integration time:
-
Permalink:
lbframe/klozeo-sdk-python@83c8d40ce2efee3941ce22bc668dd15bfe5cd85f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/lbframe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@83c8d40ce2efee3941ce22bc668dd15bfe5cd85f -
Trigger Event:
push
-
Statement type:
File details
Details for the file klozeo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: klozeo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46dd8f6e0fa4ece02b10caf6448a16e8e18a6c1325df3cdeb618a89e1cc865c1
|
|
| MD5 |
32491e6f8f513cbcaf5c41540285d34c
|
|
| BLAKE2b-256 |
3448228b912e1bb16e30da00883694ecf5907e921ba2ac3f279627bba097d1a5
|
Provenance
The following attestation bundles were made for klozeo-0.1.2-py3-none-any.whl:
Publisher:
release.yml on lbframe/klozeo-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
klozeo-0.1.2-py3-none-any.whl -
Subject digest:
46dd8f6e0fa4ece02b10caf6448a16e8e18a6c1325df3cdeb618a89e1cc865c1 - Sigstore transparency entry: 1304341733
- Sigstore integration time:
-
Permalink:
lbframe/klozeo-sdk-python@83c8d40ce2efee3941ce22bc668dd15bfe5cd85f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/lbframe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@83c8d40ce2efee3941ce22bc668dd15bfe5cd85f -
Trigger Event:
push
-
Statement type: