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.15.tar.gz
(2.3 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
File details
Details for the file prava-0.1.15.tar.gz.
File metadata
- Download URL: prava-0.1.15.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057cf5c0954340ff7840ed561ae04572645f53f0888e34b102805e6d9f84b707
|
|
| MD5 |
7090d85246d13e8c0aff31e09d0fc3cb
|
|
| BLAKE2b-256 |
41a98c4ab02530d8c38eedb38f0a2cca5fe039ab651332b3049ec73fd04d4ca1
|
File details
Details for the file prava-0.1.15-py3-none-any.whl.
File metadata
- Download URL: prava-0.1.15-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6337288c67715428ca283559710c16246e9f7ccb2a1f8943eeee17bb7921ae4f
|
|
| MD5 |
c789163d31f640e6d1a2d8df539c9707
|
|
| BLAKE2b-256 |
84a3b0c06611530310ed9fc9bafcef39961a48ecb4c216b5854ae49ea20c8877
|