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

Uploaded Python 3

File details

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

File metadata

  • Download URL: prava-0.1.14.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.14.tar.gz
Algorithm Hash digest
SHA256 8c445e1f24c3a96ed63fbb1637402cbccf3e47b84e659faf5eda7e1d2c33e3e2
MD5 d2b360d232cb53c3b01956738d3d77ee
BLAKE2b-256 bc2ee24b31f3f6418ef373a5b931365a79dd42bd9292076b0867d040c1f1ccbb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prava-0.1.14-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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 302d5f6d6792e1f360543ab2ac4e7c51d0099f11451bc46b877173bfd46e52c1
MD5 9ddf93ef4e4e76dcff1390c753ee4954
BLAKE2b-256 e87dba884ff9ddeed414fa2db78c8ab82debda08779feefc4ee441670d1efb42

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