Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.48 KB

README.md

File metadata and controls

59 lines (44 loc) · 1.48 KB

Module to access SpaceX API

(Instruções em português: README.pt)

This simple project accesses the SpaceX API to get their rocket launches information.

It also contains a data selection script, that compiles some information of interest.

Dependencies

  • Module: requests, pytest
  • Simple data selection: pandas, openpyxl

Install

Once you cloned this repository, on its main directory do:

$ make init

Usage

from spacex_api import launches

# Returns a tuple
got_launches, header = launches.get_launches()

# Prints list of launches
print(got_launches)

Simple data selection

Run the following:

$ python launches_summary.py

The script above will:

  • Indentify the year that has most launches
  • Indentify the site where most launches happened
  • Retrieve the number of launches in a specificy range of years (2019, 2021)
  • The above information is exported to a .xlsx file (launches_summary.xlsx)

Module tests

The test below will check if the API is being accessed successfully.

$ make test

Removing module

To remove the module, do:

$ make remo

References