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.12.tar.gz (2.2 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.12-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for prava-0.1.12.tar.gz
Algorithm Hash digest
SHA256 c7555561e6b9089e113670c58da757b9062ccd7af300026c2debd0fcec33ed36
MD5 0448022f925fd4cfa6add9abdf0191ec
BLAKE2b-256 03d79b9fe8e5f83f1f0355282c131cdeece418c96e57bcbaa93bcd07001d3f95

See more details on using hashes here.

File details

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

File metadata

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

Hashes for prava-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0b68330bd15c5bcb86ff2ca8f7e8d95d4d1397342f505ca54990762592d8aa5b
MD5 ae21f0b1bc32c6eda40b22b28d28c622
BLAKE2b-256 d011a5d94ab9b1ad6d235c445657867f7ce29674be8aa21dc349ef42ee9cc49c

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