Metadata-Version: 2.4
Name: kimola
Version: 0.1.1
Summary: Kimola API SDK for Python
Project-URL: Homepage, https://github.com/Kimola/api
Project-URL: Issues, https://github.com/Kimola/api/issues
Author-email: Kimola <developer@kimola.com>
License: MIT License
        
        Copyright (c) 2025 Kimola
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: api,classification,kimola,nlp,sdk,sentiment
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: httpx<1.0,>=0.27
Requires-Dist: pydantic<3.0,>=2.5
Description-Content-Type: text/markdown

# Kimola Python SDK

A lightweight, user-friendly Python SDK for the [Kimola API](https://docs.kimola.com/), closely aligned with the official documentation.

- **Authentication**: Uses a Bearer token in the `Authorization` header.
- **Base URL**: `https://api.kimola.com`
- **Version prefix**: `/v1`

## Installation

Install from PyPI (recommended):
```bash
pip install kimola==0.1.0
```

## Quickstart

```python
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

```python
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

- [GitHub Repository](https://github.com/Kimola/api/tree/main/libraries/python)
- [Kimola Privacy Policy](https://kimola.com/privacy-policy)
- [PyPI Package](https://pypi.org/project/kimola/0.1.0)