Skip to main content

Official Python client for Supascale deployment inference (POST /api/v1/{deployment_id}/chat)

Project description

supascale-ai (Python)

Minimal client for deployment chat — the same HTTP call as the dashboard Try it live button.

Install

From this monorepo:

pip install ./supascale-sdk/python

When published: pip install supascale-ai

The PyPI distribution name is supascale-ai; the Python import module is still supascale.

Usage

from supascale import Supascale

# Defaults: SUPASCALE_API_KEY, SUPASCALE_DEPLOYMENT_ID, optional SUPASCALE_API_BASE
client = Supascale()

print(client.chat("What are some fun things to do in New York?"))

Or pass credentials explicitly:

client = Supascale(
    api_key="YOUR_DEPLOYMENT_API_KEY",
    deployment_id="YOUR_DEPLOYMENT_ID",
    base_url="https://api.supascale.com",
)

Environment variables

Variable Purpose
SUPASCALE_API_KEY Deployment API key (Bearer token)
SUPASCALE_DEPLOYMENT_ID Deployment UUID
SUPASCALE_API_BASE API origin (default https://api.supascale.com)

API

  • Supascale.chat(message, *, deployment_id=..., messages=..., timeout=...)str
    Sends message plus messages (defaults to one user turn) to POST /api/v1/{id}/chat and returns the response field.

Publishing to PyPI

Homebrew and many Linux Pythons are PEP 668 “externally managed”: you cannot pip install build twine into the system interpreter. Use a venv (or pipx install twine and run pipx run build / upload from another tool).

From supascale-sdk/python:

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install --upgrade pip build twine
python -m build             # creates dist/*.whl and dist/*.tar.gz
python -m twine upload dist/*

Set PyPI credentials when prompted (username __token__, password your API token), or:

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-xxxxxxxx   # do not commit

python -m twine upload dist/*

If zsh says no matches found: dist/*, it usually means dist/ is empty because python -m build never ran (fix the venv / install steps first). After a successful build, you can upload with Bash so the glob works: bash -c 'python -m twine upload dist/*'.

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

supascale_ai-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

supascale_ai-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file supascale_ai-0.1.0.tar.gz.

File metadata

  • Download URL: supascale_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for supascale_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64eacf6ff8b71597d678e13221a59211800d37b1cbf929728bea625461d908b1
MD5 6cb36d37242696013c5b16a61ba79af8
BLAKE2b-256 7745cbc392091810362f2ab69b1dd4fc22c9f0cc7373602f332007af2e74cf57

See more details on using hashes here.

File details

Details for the file supascale_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: supascale_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for supascale_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc730dd3bc853cb4df7001a85a2808c663229c6c2099f8d23c165d9dac8c6e33
MD5 eba0c34fd156e86d57ee8ce8561aa87a
BLAKE2b-256 32c7813520d4a88e8a97e739c70363cde5851ba485b6272d756f5cce77bb47cb

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