Klu.AI Python SDK
Description
SDK for building AI Enabled apps
- Documentation: https://docs.klu.ai
- GitHub: https://github.com/klu-ai/klu-sdk
- PyPI: https://pypi.org/project/klu/
- Free software: MIT
The Klu.AI Python SDK is a library that provides access to the Klu.AI API, allowing users to interact with their workspace, applications, actions, data, models, and data indices.
Requirements
The Klu.AI Python SDK requires Python version 3.7 or later.
Installation
To install the Klu.AI Python SDK, simply run:
pip install klu
Getting Started
To use the Klu.AI Python SDK, you must first obtain an API key from the Klu.AI website. Once you have your API key, you can create a KluClient object:
from klu import KluClient
client = KluClient("YOUR_API_KEY")
Once you have a KluClient object, you can access the different models available in the Klu API:
from klu import KluClient
client = KluClient("YOUR_API_KEY")
models = await client.models.get("model_guid")
There is also a separate function to stream action prompt
Each of these objects provides methods for interacting with the corresponding model in the Klu API. For example, to list all applications in your workspace, you can use:
from klu import KluClient
client = KluClient("YOUR_API_KEY")
applications = client.applications.list()
In a similar manner, in order to get a list of data points for an action, you can do the following
from klu import KluClient
client = KluClient("YOUR_API_KEY")
data = client.data.get_action_data("action_id")
There is a special client that allows to stream action prompts. The streaming url can be received from the action creation response.
from klu import KluClient
client = KluClient("YOUR_API_KEY")
prompt_response = await client.actions.run_action_prompt("action_guid", "prompt", streaming=True)
async for message in client.sse_client.get_streaming_data(prompt_response.streaming_url):
print(message)
Documentation
For more detailed information on how to use the Klu.AI Python SDK, please refer to the API documentation.
Credits
This package was created with Cookiecutter and the waynerv/cookiecutter-pypackage project template.
Release files for klu-test-pipeline 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| klu_test_pipeline-0.1.6.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| klu_test_pipeline-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.0 kB
Release files / klu_test_pipeline-0.1.6.tar.gz
| Download URL | klu_test_pipeline-0.1.6.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed8757683ba2017c74b67ac17b00388f718ad8bccf08fca7fb27d16edbef6f30
|
|
BLAKE2b-256 checksum How to use checksums |
0ebd6c3232d099c1a9ebaf1e1d58ae2acf76b2bf46813fcbf3afdb884f7f93cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / klu_test_pipeline-0.1.6-py3-none-any.whl
| Download URL | klu_test_pipeline-0.1.6-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac5c1d27e73ae765a0ad434cfcc29b444b2c75c3a9411ec0158366a0b5dfd8e2
|
|
BLAKE2b-256 checksum How to use checksums |
d6e658e5be1377747808731d3ef8579acc0786eb24a8e720e6fc40fcc828183a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|