A lightweight Python utility designed to automatically fetch the NASA Astronomy Picture of the Day (APOD) and set it as your Windows desktop wallpaper. Software is using DEMO_KEY standardly (you can use private one after registration at NASA's API), which has these limitations: Hourly Limit: 30 requests per IP address per hour. Daily Limit: 50 requests per IP address per day.
- Daily Updates: Automatically grabs the latest space imagery from NASA's official API.
- High-Resolution Support: Prioritizes HD imagery (
hdurl) with an automatic fallback to standard resolution if HD is unavailable. - Fail-safe: It NASA launches a video as the APoD, it will not be set as Wallpaper, APoD will be ignored.
- Silent Background Operation: Runs as a
.pywprocess, meaning no console windows or pop-ups will interrupt your work. - Robust Path Handling: Automatically ensures the destination folder exists, even in complex OneDrive or custom Windows setups.
Ensure you have Python 3.x installed along with the requests library:
- pip install requests
To use this as a standalone application without needing Python installed on the target machine, compile it using PyInstaller:
- pip install pyinstaller
- pyinstaller --noconsole --onefile app.pyw
- or
- python -m PyInstaller --noconsole --onefile app.pyw
The compiled executable will be located in the /dist folder. Based on Python version, you will get x86 (32-bit) or x64 (64-bit) executable. 32-bit can run on 32-bit and on 64-bit OS aswell, 64-bit can run on 64-bit OS only!
To ensure your wallpaper updates every time you turn on your PC:
- Press
Win + Ron your keyboard. - Type
shell:startupand press Enter. - Move the compiled
.exe(or a shortcut to it) into this folder.
- API: Uses the NASA Planetary Inventory API.
- Win32 Integration: Utilizes
ctypes.windll.user32.SystemParametersInfoWto communicate directly with the Windows API for instant wallpaper application without a system restart. - Storage: Images are saved locally to your
Picturesfolder asnasa_apod_wallpaper.jpg.
This project is open-source and available under the MIT License.
Created by Martin Chlebovec