Prava Python SDK – OpenAI-like API client for LLMs.
Project description
Prava Python SDK
Minimal, OpenAI-like client for the Prava API.
Install
pip install prava
Usage
from prava import Prava
import os
client = Prava(api_key=os.getenv("PRAVA_API_KEY"))
completion = client.chat.completions.create({
"model": "prava-large",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a haiku about coffee."},
],
})
print(completion["choices"][0]["message"]["content"])
Configuration
api_key: Explicit API key, or setPRAVA_API_KEYenv var.base_url: Override base URL or setPRAVA_BASE_URLenv var.timeout: Request timeout seconds (default 60).
License
MIT
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
prava-0.1.5.tar.gz
(2.2 kB
view details)
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
prava-0.1.5-py3-none-any.whl
(2.7 kB
view details)
File details
Details for the file prava-0.1.5.tar.gz.
File metadata
- Download URL: prava-0.1.5.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91f105c6cbf17c0c82e246cae415dec38b24d3c44938ea7d9be2d6868b4268eb
|
|
| MD5 |
430f4f68211725dff2640fc40bd3976c
|
|
| BLAKE2b-256 |
5373e2ef20356a5e23b5ab079f35a1c6a31b2d6738b2fe5474687703791f03d2
|
File details
Details for the file prava-0.1.5-py3-none-any.whl.
File metadata
- Download URL: prava-0.1.5-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c8c62dbd5307bfef62929d0304f9c059cd24d53811cfef3c786e535abd2268e
|
|
| MD5 |
237f16b99c937cfd6a31a5125c3f7619
|
|
| BLAKE2b-256 |
99dade93a2ecaf0ef26d6e9d2283cd4be55baf889aef23a1462f01e8d7db4f3f
|