Python client for RunPod Cloud REST API
Project description
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
pip install -e .
Quick Start
- Set your API key:
export RUNPOD_API_KEY=your_api_key_here
- Use the clients:
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 for full API reference and examples.
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check evolvishub_runpod_management/ tests/
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evolvishub_runpod_management-0.1.5.tar.gz.
File metadata
- Download URL: evolvishub_runpod_management-0.1.5.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7fd2046e20be237201e2caf6fa602657c7771361bedcc51581b88b68fab3072
|
|
| MD5 |
0c7c9761dca0e3e72e7f3f71bc59f1f9
|
|
| BLAKE2b-256 |
3b6434342e4c374b5bd8a5e48cf70c1cd4af2199d220b113d3cbf9612371c4d4
|
Provenance
The following attestation bundles were made for evolvishub_runpod_management-0.1.5.tar.gz:
Publisher:
publish-prod.yml on evolvisai/evolvishub-runpod-management
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evolvishub_runpod_management-0.1.5.tar.gz -
Subject digest:
f7fd2046e20be237201e2caf6fa602657c7771361bedcc51581b88b68fab3072 - Sigstore transparency entry: 938708965
- Sigstore integration time:
-
Permalink:
evolvisai/evolvishub-runpod-management@3a2a69a9b210798a70c8c4e4aaa1c0c610c2c6f6 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/evolvisai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-prod.yml@3a2a69a9b210798a70c8c4e4aaa1c0c610c2c6f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file evolvishub_runpod_management-0.1.5-py3-none-any.whl.
File metadata
- Download URL: evolvishub_runpod_management-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eaf4c2afce9c6b3e2410c1f52ad0c96d6d2e54a07ce3bcc5bbc483369611a03
|
|
| MD5 |
2f7f5909de31323caf665f2ebd6e4036
|
|
| BLAKE2b-256 |
e6a41db2313d3a1e01583c4df9a621eaad5f92bf4a915d496f290119dbc4de58
|
Provenance
The following attestation bundles were made for evolvishub_runpod_management-0.1.5-py3-none-any.whl:
Publisher:
publish-prod.yml on evolvisai/evolvishub-runpod-management
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evolvishub_runpod_management-0.1.5-py3-none-any.whl -
Subject digest:
3eaf4c2afce9c6b3e2410c1f52ad0c96d6d2e54a07ce3bcc5bbc483369611a03 - Sigstore transparency entry: 938708987
- Sigstore integration time:
-
Permalink:
evolvisai/evolvishub-runpod-management@3a2a69a9b210798a70c8c4e4aaa1c0c610c2c6f6 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/evolvisai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-prod.yml@3a2a69a9b210798a70c8c4e4aaa1c0c610c2c6f6 -
Trigger Event:
release
-
Statement type: