#!/usr/bin/env python3 import os import sys from pathlib import Path from dotenv import load_dotenv import runpod # Load environment env_path = Path.cwd().parent / '.env.runpod' load_dotenv(env_path) runpod.api_key = os.getenv('RUNPOD_API_KEY') # Get GPU types and check specific GPUs gpu_types = runpod.get_gpus() target_gpus = ['RTX 4090', 'RTX 4000 Ada', 'RTX 5090'] for target in target_gpus: for gpu in gpu_types: if target in gpu.get('displayName', ''): print(f"\n{target} details:") print(f" secureCloud: {gpu.get('secureCloud', 0)}") print(f" communityCloud: {gpu.get('communityCloud', 0)}") print(f" memoryInGb: {gpu.get('memoryInGb', 0)}") price_info = gpu.get('lowestPrice', {}) if price_info: print(f" uninterruptablePrice: {price_info.get('uninterruptablePrice', 'N/A')}") else: print(f" price: N/A") break