An open API service indexing awesome lists of open source software.

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

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/))