INNER CODE UNIT · Python

api_version

psalias2006/gpu-hot · app.py:97

async def api_version():
    """Get current version and check for updates from GitHub"""
    current_version = __version__
    
    try:
        # Check GitHub for latest release
        async with aiohttp.ClientSession() as session:
            async with session.get(
                "https://api.github.com/repos/psalias2006/gpu-hot/releases/latest",
                timeout=aiohttp.ClientTimeout(total=5)
            ) as response:
                if response.status == 200:
                    data = await response.json()
                    latest_version = data.get("tag_name", "").lstrip("v")
                    
                    # Only show update if latest > current
                    update_available = compare_versions(current_version, latest_version) if latest_version else False
                    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…