Metadata-Version: 2.4
Name: vectorlay
Version: 0.1.0
Summary: The official Python SDK for the VectorLay API
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: httpx<1,>=0.25.0
Requires-Dist: pydantic<3,>=2.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.20; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Description-Content-Type: text/markdown

# VectorLay Python SDK

The official Python SDK for the [VectorLay](https://vectorlay.com) API.

## Installation

```bash
pip install vectorlay
```

## Quick Start

```python
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

```python
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
