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

Uploaded Python 3

File details

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

File metadata

  • Download URL: prava-0.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 771e8ca3d6be4d81b7467426a2e040d1bb5aedfb7c0395b1d15534d733c9d3ee
MD5 71de50ba51ab5184f8ae6c67b1ff15ec
BLAKE2b-256 a43ec12169389327fe1fdb807a868d6bbf93d066fefb92dd5ee96a7aaef0e37e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prava-0.1.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a089b64761f2f3837a9ea19fa56980030c8f73c55f096ca1f46fa68af1363dc3
MD5 6f2c63e1e0886b2899bf6f05252003e6
BLAKE2b-256 7b3a58cacb682d6c2a6610f4ab3c2666cbf96a2e107652c5cd79c9a2871b9ebf

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