Skip to content

A Python class for making requests to space-track.org

License

Notifications You must be signed in to change notification settings

Engineero/spacetracktool

Repository files navigation

SpaceTrackTool

Master branch Travis CI - Build Status Coveralls - Test Coverage PyPI - Python Version PyPI
Develop branch Travis CI - Build Status Coveralls - Test Coverage

A Python API for making queries to space-track.org. To install:

pip install spacetracktool

To use, first get a username and password for space-track.org, then create a query of the desired class. For example, to create a TLE query:

import spacetracktool as st
query = st.SpaceTrackClient('username', 'password')
result = query.tle_query(norad_cat_id=12345)  # look for a specific satellite ID

To create a slightly more complicated query, using ranges for some arguments:

import spacetracktool as st
from spacetracktool import operations as ops
query = st.SpaceTrackClient('username', 'password')
date_range = ops.make_range_string('2018-01-01', '2018-01-31')
result = query.tle_query(epoch=date_range)  # generates and submits query

The official documents for the space-track.org API can be found here.