feat: add RunPod client

- Add a new RunPod client to the project.
- This client allows users to interact with the RunPod API to create and manage pods.
- Includes example usage and configuration options.
This commit is contained in:
Mahmoud Emad
2025-01-19 22:20:47 +02:00
parent 03e5a56d62
commit 0d2307acc8
7 changed files with 495 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
// import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.clients.runpod
// Example 1: Create client with direct API key
mut rp := runpod.get_or_create(
name: 'example1'
api_key: 'rpa_1G9W44SJM2A70ILYQSPAPEKDCTT181SRZGZK03A22lpazg'
)!
// Create a new pod
pod_response := rp.create_pod(
name: 'test-pod'
image_name: 'runpod/tensorflow'
)!
println('Created pod with ID: ${pod_response.id}')