Skip to main content

The official Python SDK for the VectorLay API

Project description

VectorLay Python SDK

The official Python SDK for the VectorLay API.

Installation

pip install vectorlay

Quick Start

import vectorlay

client = vectorlay.Client(api_key="vl_your_api_key")

# List available GPUs
gpus = client.gpus.list()

# Deploy a cluster
cluster = client.clusters.create(
    name="my-inference",
    gpu_type="h100",
    replicas=2,
    container="vllm/vllm-openai:latest",
    env={"MODEL": "meta-llama/Llama-3-8B"},
    container_port=8000,
)

# Wait for it to be ready
cluster = client.clusters.wait_for_status(cluster.id)
print(f"Cluster running at: {cluster.endpoint_url}")

# Scale up
client.clusters.scale(cluster.id, replicas=4)

# Create a VM
vm = client.vms.create(
    name="dev-box",
    ssh_key_ids=["your-ssh-key-id"],
    gpu_type="rtx-4090",
    gpu_count=1,
    disk_size_gb=100,
)

Async Usage

import asyncio
import vectorlay

async def main():
    async with vectorlay.AsyncClient(api_key="vl_your_api_key") as client:
        clusters = await client.clusters.list()
        print(clusters)

asyncio.run(main())

Configuration

The client accepts these parameters:

Parameter Env Variable Default
api_key VECTORLAY_API_KEY Required
base_url VECTORLAY_BASE_URL https://api.vectorlay.com
timeout 60.0 seconds
max_retries 2

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

vectorlay-0.1.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

vectorlay-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vectorlay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42facebb1ae7556f44c0a9d6600130573d7c2fb757fa1933b428464a4d88066a
MD5 9ec102e093261ab7ded4e789a6f40e12
BLAKE2b-256 f1e5c9ef9fe31286fa7c09bf7c12288080d969d266b013de73d4a02c561b2410

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vectorlay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d5bffecfb96b5fe72abc11bb2a8346600af1686246f96f45cd8143c5eea8dc8
MD5 386bdb49e9e5bfa9335505697791831e
BLAKE2b-256 4fa73432c5c16b91ccac3bbbf184acf813ddf813171ddbcc8ad48acf1cda0f07

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