Kimola API SDK for Python
Project description
Kimola Python SDK
A lightweight, user-friendly Python SDK for the Kimola API, closely aligned with the official documentation.
- Authentication: Uses a Bearer token in the
Authorizationheader. - Base URL:
https://api.kimola.com - Version prefix:
/v1
Installation
Install from PyPI (recommended):
pip install kimola==0.1.0
Quickstart
from kimola import Kimola
# Replace with your actual API key
sdk = Kimola(api_key="YOUR_API_KEY")
# Presets
presets = sdk.presets.list(page_size=10, page_index=0, type="Classifier", category="Sentiment Classifier")
one = sdk.presets.get("8kq3w1h2f0c7b5m9r2t6y4u1")
labels = sdk.presets.labels("8kq3w1h2f0c7b5m9r2t6y4u1")
pred = sdk.presets.predict(
"8kq3w1h2f0c7b5m9r2t6y4u1",
text="Great product!",
language="en",
aspect_based=False
)
# Queries
q = sdk.queries.list(
page_index=0,
page_size=10,
start_date="2025-08-15T00:00:00Z",
end_date="2025-09-15T23:59:59Z"
)
qs = sdk.queries.statistics(
start_date="2025-08-15T00:00:00Z",
end_date="2025-09-15T23:59:59Z"
)
# Subscription usage
usage = sdk.subscription.usage(date="2025-09-15T00:00:00Z")
print(usage)
# Don't forget to close the SDK connection when done
sdk.close()
Async Usage
import os
import asyncio
from kimola import KimolaAsync
api_key = os.environ["KIMOLA_API_KEY"]
async def main():
async with KimolaAsync(api_key=api_key) as sdk:
presets = await sdk.presets.list(page_size=5)
print(presets)
asyncio.run(main())
Security Note
Never hardcode your API keys. Store sensitive credentials like your Kimola API key in environment variables (e.g., KIMOLA_API_KEY) and read them securely in your code.
Links
Project details
Release history Release notifications | RSS feed
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 kimola-0.1.1.tar.gz.
File metadata
- Download URL: kimola-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
684945d4289ab1363bb28483ec454fc2a647a588e5188c4f5025d352e50b797f
|
|
| MD5 |
2606d7806a23f409c3d8a7d58095138f
|
|
| BLAKE2b-256 |
ca7c6e6c7e82a18b2a61ecd8ed33f1b68cc1dabd1525453e91bed52c84f3e615
|
File details
Details for the file kimola-0.1.1-py3-none-any.whl.
File metadata
- Download URL: kimola-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
677d84468b3ca236ddae56b1089e94fba3334c610e6e5f6190cdd2428388cf6c
|
|
| MD5 |
66715562140bd8f740a0c56d95db5ee6
|
|
| BLAKE2b-256 |
e1724f170808b01b887905bfe841014ff70d234b29ceb81778d24c1b4908090f
|