Satcat SDK 1.0.7 Documentation#

This is the documentation for the Satcat Software Development Kit (SDK) and Command-Line Interface (CLI).

The Satcat SDK is a Python client library for interacting with Satcat web services. It can be used to easily integrate Satcat services such as ephemeris screening into automated scripts and processes using Python.

The Satcat SDK also comes with a Command-Line Interface (CLI) for quickly interacting with SDK functionality from the command line.

Installation#

The Satcat SDK is distributed as a Python package which can be installed using pip or any pypi package manager.

$ pip install satcat

Quickstart#

Interacting with the Satcat SDK or CLI requires an API key. Please visit the Satcat Control Center to create or manage your API keys.

SDK#

from satcat.sdk import settings
from satcat.sdk.client import Client

# authentication through python code
settings.auth_client_id = "<insert api key client id>"
settings.auth_client_secret = "<insert api key secret>"

with Client() as client:
    # Upload an O/O Ephemeris to Satcat
    ephemeris = client.screening.create_ephemeris(
        "MEME_25544_ISS_Ephemeris_2022181_OEM.txt",
        file_format="oem",
        norad_id=25544
    )

    # Create a Screening for the uploaded Ephemeris and submit it
    screening = client.screening.create_screening(
        primaries=[ephemeris],
        add_best_secondary_catalog=True,
        submit=True
    )

    # Await asynchronous processing of the Screening on Satcat's servers
    screening = client.screening.await_screening_completion(screening)

    # Retrieve the conjunctions detected by the Screening
    conjunctions = client.screening.list_conjunctions(screening.id)

See Getting Started - SDK for more information on setting up your environment for interacting with the SDK.

CLI#

# authentication through environment variables
SATCAT_AUTH_CLIENT_ID="<insert api key client id>"
SATCAT_AUTH_CLIENT_SECRET="<insert api key secret>"

# Create and submit a screening for an O/O ephemeris file, save the metadata to a JSON file, and await completion
$ satcat -o json create screening --pid 25544 --pef MEME_25544_ISS_Ephemeris_2022181_OEM.txt --pfmt oem --wait > my_screening.json
# Retrieve the conjunctions detected by the Screening after completion
$ jq ".id" -r my_screening.json | xargs satcat list conjunctions

Configuration#

The Satcat SDK has a number of user-configurable global settings. See Configuration for further details.