Skip to main content

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 set PRAVA_API_KEY env var.
  • base_url: Override base URL or set PRAVA_BASE_URL env var.
  • timeout: Request timeout seconds (default 60).

License

MIT

Project details


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.17.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prava-0.1.17-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file prava-0.1.17.tar.gz.

File metadata

  • Download URL: prava-0.1.17.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

Hashes for prava-0.1.17.tar.gz
Algorithm Hash digest
SHA256 0cfa2c0a87719bfdfa3134668d5c5222b03e05bcad35ad1a8d69259a14d2c059
MD5 12b097345709c026cfcfcc98d1042564
BLAKE2b-256 ec1fef1593e91f7bcdf0d7664042774072e1a65cd8237e6b912866a39505c14e

See more details on using hashes here.

File details

Details for the file prava-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: prava-0.1.17-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

Hashes for prava-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb4732eee7bc65d26d00a2b54ec41c8d73e1b3960ebba0c96a56c33cf8a396f
MD5 f1004a3d942d7a2f78709dafedb43cd8
BLAKE2b-256 16bbec2a609da0dc2a46e04c1994466f6b0752e78bcdee54e5a35019e05bee92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page