Skip to content

It is a rest api thats return closing to earth asteroids information as a json array

License

Notifications You must be signed in to change notification settings

Muhammed-Kahraman/Nasa_near_earth_objects_api

Repository files navigation

Asteroids - NeoWs Rest Api

Retrieve a json array of Asteroids special information ordered by the their closest passing point to (km) to Earth.

Which information you can get with this API ?

 - Asteroids name,
 - Closest approach date,
 - Closest passing point (km) from Earth, 
 - Min Estimated diameter (km) and max Estimated diameter (km)

Date format: YYYY-MM-DD

Maximum possible day between start date and end date: 7

The oldest date you can make a request: 1899-12-30

The latest date you can make a request: 2201-01-01

 

virtualenv environment

  1. Clone the repo
git clone https://github.com/Muhammed-Kahraman/Nasa_near_earth_objects_api.git
  1. cd into the new directory
cd Nasa_near_earth_objects_api 
  1. Create a new virtual environment env in the directory
python -m virtualenv env
  1. Activate the new environment
.\env\Scripts\activate
  1. Install dependencies in new environment
pip install -r requirements.txt
Create a .env file same directory with the project.
Set up secret_key and nasa apikey inside this file (secret_key = "", apiKey = "")
  1. Run the server locally
python manage.py migrate
python manage.py makemigrations
python manage.py runserver 

Docker build

Create a .env file same directory with the project.
Set up secret_key and nasa apikey inside this file (secret_key = "", apiKey = "")
 docker compose up --build