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.16.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.16-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prava-0.1.16.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.16.tar.gz
Algorithm Hash digest
SHA256 336b18f30583bbf8bac2e91fff905bdef9dc2329168b64fcabf757188c144d55
MD5 8a37e5595643a6e8fa618fe1a89835f6
BLAKE2b-256 b6f7a1cc64c5a5a9284eeb28d198ea7a97c522379f7e80ddf44033b463205d0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prava-0.1.16-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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3d6b8f62e0cd8bfc3a32ee5d799d02ae8fd9ea382b02593975e8718bfeaaf4ac
MD5 543da6cbb79ad79564a5ce9e181df689
BLAKE2b-256 788f9a9073050e49a547c3852f4c43c964eb416bf7556bed50de67d04bf59e59

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