https://github.com/iqbalmind/nasa-apod-api-project
NASA APOD (Astronomy Picture of the Day) API PROJECT using Python
https://github.com/iqbalmind/nasa-apod-api-project
api apod apod-api python-api python-nasa-api
Last synced: 12 months ago
JSON representation
NASA APOD (Astronomy Picture of the Day) API PROJECT using Python
- Host: GitHub
- URL: https://github.com/iqbalmind/nasa-apod-api-project
- Owner: IqbalMind
- Created: 2023-02-28T14:50:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T15:02:21.000Z (over 3 years ago)
- Last Synced: 2025-06-14T03:04:45.746Z (12 months ago)
- Topics: api, apod, apod-api, python-api, python-nasa-api
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NASA APOD API Project
NASA APOD (Astronomy Picture of the Day) API PROJECT using Python
This project demonstrates how to use the NASA Astronomy Picture of the Day (APOD) API to download and save an image from a specific date.
Before running the Python code, make sure you have the following installed:
- Python 3.0 or higher
- requests module (can be installed with **pip install requests**)
- pillow module (can be installed with **pip install pillow**)
- A NASA API key (can be obtained from [https://api.nasa.gov/](https://api.nasa.gov/]))
## Getting Started
1. Clone the repository or download the **main.py** file.
2. Open the apod.py file in your text editor.
3. Replace **"YOUR_API_KEY"** with your NASA API key.
4. Replace the *date* and *file_path* variables with your desired date and file path.
5. Save the changes to the file.
## Usage
To download and save an APOD image, run the **main.py** script in your terminal or command prompt with the command python **main.py**. The image from the specified date will be downloaded and saved to the file path you specified.
## Example
```python
python main.py
```
## Acknowledgements
- NASA APOD API ([https://api.nasa.gov/](https://api.nasa.gov/))
- requests module ([https://pypi.org/project/requests/](https://pypi.org/project/requests/))
- pillow module ([https://pillow.readthedocs.io/en/stable/](https://pillow.readthedocs.io/en/stable/))