Skip to content
Python Project
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
.gitignore
App.py
README.md

README.md

Python Project

In the following project NASA's astronomical data about celestial bodies moving near the Earth's orbit will be used. The API is called Neo, which is an abbreviation for Near Earth Objects.

Requirements

⋅ python package requests

$ pip install requests

Cache

Since the data is not updated very often, the call of the API is cached for 3 days. The mechanism is set so that if a local file exists in the data folder, it will be loaded if the data is not older than 30 days. Otherwise the data will be loaded from the API and stored in a file with the timestamp as postfix until when the data is valid.

NASA API

Get a API Key

Go to https://api.nasa.gov/

Signup for a API-Key and enter your data in the form

⋅ First Name 
⋅ Last Name 
⋅ Email 

As a response you'll see the following message:

Your API key for <E-Mail> is:

<API-KEY>
You can start using this key to make web service requests. Simply pass your key in the URL when making a web request. Here's an example:

https://api.nasa.gov/planetary/apod?api_key=<API-KEY>
For additional support, please contact us (nasa-data@lists.arc.nasa.gov). When contacting us, please tell us what API you're accessing and provide the following account details so we can quickly find you:

Account Email: <E-MAIL>
Account ID: <ACCOUNT-ID>

You will also receive the information by e-mail.

Limitations

The API only returns the data for the last seven days from the start date.

Run Application

⋅ Open App.py and run it

You can’t perform that action at this time.