Skip to content

HiKaylum/SpaceX-PY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaceX-PY

Build Status GitHub issues GitHub license GitHub stars

About

Python wrapper for the unofficial SpaceX REST API. All information on such can be found here. Used for retrieving information about:

  • Capsules
  • Cores
  • Launches
  • Launchpads
  • Rockets
  • Miscellaneous data

Installation

Command to install the package into your environment:

pip install spacex-py

Usage

Documentation for all queries can be found in their respective source files. This wrapper matches the SpaceX API, allowing for ease uf use. Let's go through some examples:

from spacex_py import launches

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

# PyLint being a pain about header? use the following:
got_launches, _ = launches.get_launches()

# Prints a list of launches
print(got_launches)

Now let's get launches using a query:

from spacex_py import launches

#Queries launches using the specific site id
got_launches, _ = launches.get_launches(site_id="ksc_lc_39a")

#Example query using multiple parameters
got_launches, _ = launches.get_launches(site_id="ksc_lc_39a", payload_type='Satellite')

#Prints a list of launches fitting the above parameters
print(got_launches)

License

This project uses the MIT License. More information can be found in LICENSE.

About

Python wrapper for the SpaceX API

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages