Files
herolib/lib/clients/runpod
mariobassem 01fff39e41 refactor: improve runpod client
- Refactor RunPod client to use environment variables for API key.
- Update RunPod example script to reflect changes.
- Remove unused gql_builder.v file.
- Update README.md to reflect changes.
- Improve error handling and logging.
- Use json2 for JSON encoding/decoding.
- Update dependencies.
- Implemented more endpoints for managing pods.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-23 16:17:12 +02:00
..
2025-01-19 22:20:47 +02:00
2025-01-23 16:17:12 +02:00
2025-01-23 16:17:12 +02:00
2025-01-23 16:17:12 +02:00
2025-01-23 16:17:12 +02:00
2025-01-23 16:17:12 +02:00

runpod

To get started




import freeflowuniverse.crystallib.clients. runpod

mut client:= runpod.get()!

client...




example heroscript

!!runpod.configure
    secret: '...'
    host: 'localhost'
    port: 8888

RunPod API Example

This script demonstrates creating, stopping, starting, and terminating RunPod pods using the RunPod API. It creates both on-demand and spot pods.

Requirements

  • Environment variable RUNPOD_API_KEY set with your RunPod API key

How to Run

  • Find out our example in: examples/develop/runpod/runpod_example.vsh