Metadata-Version: 2.4
Name: evolvishub-runpod-management
Version: 0.1.5
Summary: Python client for RunPod Cloud REST API
Project-URL: Homepage, https://github.com/evolvisai/evolvishub-runpod-management
Project-URL: Repository, https://github.com/evolvisai/evolvishub-runpod-management
Project-URL: Documentation, https://github.com/evolvisai/evolvishub-runpod-management/blob/main/docs/usage.md
Project-URL: Issues, https://github.com/evolvisai/evolvishub-runpod-management/issues
Author-email: Kevin Medina <k.medina@evolvis.ai>
License: MIT
License-File: LICENSE
Keywords: api,client,cloud,gpu,management,runpod
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: httpx<1.0,>=0.27
Requires-Dist: pydantic<3.0,>=2.0
Requires-Dist: python-dotenv<2.0,>=1.0
Provides-Extra: dev
Requires-Dist: pytest-httpx>=0.34; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# RunPod Management

A Python client for the RunPod Cloud REST API.

## Features

- Full pod lifecycle management (create, list, get, update, delete)
- Pod control operations (start, stop, restart)
- Container registry authentication management (CRUD)
- Type-safe Pydantic models for all requests and responses
- Configuration via environment variables or programmatic setup
- Comprehensive error handling

## Installation

```bash
pip install -e .
```

## Quick Start

1. Set your API key:

```bash
export RUNPOD_API_KEY=your_api_key_here
```

2. Use the clients:

```python
from evolvishub_runpod_management import PodClient, ContainerRegistryAuthClient, PodCreateInput

# Pod management
with PodClient.initialize() as client:
    # Create a pod
    pod = client.create_pod(PodCreateInput(
        image_name="runpod/pytorch:2.0.0-py3.10-cuda11.8.0-devel",
        name="my-pod",
        gpu_type_ids=["NVIDIA RTX A4000"],
        container_disk_in_gb=50,
    ))
    print(f"Created: {pod.id}")

    # List all pods
    for p in client.list_pods():
        print(f"{p.id}: {p.name} - {p.desired_status}")

    # Stop the pod
    client.stop_pod(pod.id)

# Container registry auth management
from evolvishub_runpod_management import ContainerRegistryAuthCreateInput

with ContainerRegistryAuthClient.initialize() as client:
    # Create credentials
    auth = client.create(ContainerRegistryAuthCreateInput(
        name="my-docker-hub",
        username="myuser",
        password="mypassword",
    ))
    print(f"Created auth: {auth.id}")

    # List all credentials
    for a in client.list():
        print(f"{a.id}: {a.name}")
```

## Documentation

See [docs/usage.md](docs/usage.md) for full API reference and examples.

## Development

```bash
# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check evolvishub_runpod_management/ tests/
```

## License

MIT
