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.6.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.6-py3-none-any.whl
(2.7 kB
view details)
File details
Details for the file prava-0.1.6.tar.gz.
File metadata
- Download URL: prava-0.1.6.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 |
686261ba58dfb482bee54aac4e9dfdcd869cbde86fb160b235304a3d812ae3ae
|
|
| MD5 |
ac5a2676c25a7e4e65dc76be7fd375d4
|
|
| BLAKE2b-256 |
d510f278c547f565158cc67db5c8b4d307a8ba74184d9803c78b1fd35e3b1d48
|
File details
Details for the file prava-0.1.6-py3-none-any.whl.
File metadata
- Download URL: prava-0.1.6-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 |
e2639aef430470f1e265faf3c1915b5577a5d98d3da546d761bb2837ffa4db03
|
|
| MD5 |
ca36a1900a413001bb7987451321ff91
|
|
| BLAKE2b-256 |
24704c0ea634492c83e0f3211b768d5ee082a7105f9eb6db2f88e9794433c930
|