satcat.sdk package#
Subpackages#
- satcat.sdk.events package
- Submodules
EventClientConjunctionDetailedConjunctionDetailed.angle_of_approachConjunctionDetailed.created_atConjunctionDetailed.designationConjunctionDetailed.event_idConjunctionDetailed.frisbee_collision_probabilityConjunctionDetailed.frisbee_collision_probability_methodConjunctionDetailed.idConjunctionDetailed.is_intra_orgConjunctionDetailed.key_numberConjunctionDetailed.mahalanobis_distanceConjunctionDetailed.primaryConjunctionDetailed.primary_stateConjunctionDetailed.relative_miss_sig_mConjunctionDetailed.relative_position_c_kmConjunctionDetailed.relative_position_i_kmConjunctionDetailed.relative_position_r_kmConjunctionDetailed.relative_sig_ct_u_mConjunctionDetailed.relative_sig_it_u_mConjunctionDetailed.relative_sig_r_u_mConjunctionDetailed.relative_velocity_c_km_sConjunctionDetailed.relative_velocity_i_km_sConjunctionDetailed.relative_velocity_mag_km_sConjunctionDetailed.relative_velocity_r_km_sConjunctionDetailed.secondaryConjunctionDetailed.secondary_stateConjunctionDetailed.updated_at
ConjunctionMinimalConjunctionMinimal.cdm_idConjunctionMinimal.collision_probabilityConjunctionMinimal.collision_probability_methodConjunctionMinimal.creation_dateConjunctionMinimal.event_idConjunctionMinimal.keyConjunctionMinimal.miss_distance_kmConjunctionMinimal.original_collision_probabilityConjunctionMinimal.original_collision_probability_methodConjunctionMinimal.originatorConjunctionMinimal.primaryConjunctionMinimal.secondaryConjunctionMinimal.tca
EventPCRemediationMethodRSODetailedRSOMetadataModelSpacecraftConjunctionStateSpacecraftConjunctionState.altitude_kmSpacecraftConjunctionState.cdrg_drgSpacecraftConjunctionState.cdrg_nSpacecraftConjunctionState.cdrg_ndotSpacecraftConjunctionState.cdrg_rSpacecraftConjunctionState.cdrg_rdotSpacecraftConjunctionState.cdrg_tSpacecraftConjunctionState.cdrg_tdotSpacecraftConjunctionState.cn_nSpacecraftConjunctionState.cn_rSpacecraftConjunctionState.cn_tSpacecraftConjunctionState.cndot_nSpacecraftConjunctionState.cndot_ndotSpacecraftConjunctionState.cndot_rSpacecraftConjunctionState.cndot_rdotSpacecraftConjunctionState.cndot_tSpacecraftConjunctionState.cndot_tdotSpacecraftConjunctionState.comment_covariance_scale_factorSpacecraftConjunctionState.comment_exclusion_volume_radiusSpacecraftConjunctionState.comment_screening_data_sourceSpacecraftConjunctionState.covariance_methodSpacecraftConjunctionState.cr_rSpacecraftConjunctionState.crdot_nSpacecraftConjunctionState.crdot_rSpacecraftConjunctionState.crdot_rdotSpacecraftConjunctionState.crdot_tSpacecraftConjunctionState.csrp_drgSpacecraftConjunctionState.csrp_nSpacecraftConjunctionState.csrp_ndotSpacecraftConjunctionState.csrp_rSpacecraftConjunctionState.csrp_rdotSpacecraftConjunctionState.csrp_srpSpacecraftConjunctionState.csrp_tSpacecraftConjunctionState.csrp_tdotSpacecraftConjunctionState.ct_rSpacecraftConjunctionState.ct_tSpacecraftConjunctionState.ctdot_nSpacecraftConjunctionState.ctdot_rSpacecraftConjunctionState.ctdot_rdotSpacecraftConjunctionState.ctdot_tSpacecraftConjunctionState.ctdot_tdotSpacecraftConjunctionState.ephemeris_idSpacecraftConjunctionState.ephemeris_nameSpacecraftConjunctionState.hbr_mSpacecraftConjunctionState.intrack_thrustSpacecraftConjunctionState.ref_frameSpacecraftConjunctionState.screening_idSpacecraftConjunctionState.time_lastob_endSpacecraftConjunctionState.time_lastob_startSpacecraftConjunctionState.x_dot_kmSpacecraftConjunctionState.x_kmSpacecraftConjunctionState.y_dot_kmSpacecraftConjunctionState.y_kmSpacecraftConjunctionState.z_dot_kmSpacecraftConjunctionState.z_km
- Submodules
- satcat.sdk.propagation package
- satcat.sdk.screening package
- Submodules
CatalogConjunctionConjunction.cdm_idConjunction.collision_probabilityConjunction.collision_probability_methodConjunction.created_atConjunction.idConjunction.keyConjunction.key_numberConjunction.launch_timeConjunction.miss_distance_kmConjunction.originatorConjunction.primaryConjunction.secondaryConjunction.tca
CoverageLevelEphemerisEphemeris.apogee_kmEphemeris.archivedEphemeris.commentsEphemeris.contextEphemeris.covariance_correctedEphemeris.current_operationalEphemeris.data_formatEphemeris.designationEphemeris.ephemeris_sourceEphemeris.filenameEphemeris.has_covarianceEphemeris.hbr_mEphemeris.idEphemeris.launch_timeEphemeris.norad_idEphemeris.perigee_kmEphemeris.solution_timeEphemeris.source_ephemeris_idEphemeris.usable_time_endEphemeris.usable_time_startEphemeris.user_id
EphemerisContextEphemerisDesignationEphemerisGroupEphemerisSourceEphemerisTypeExternalCatalogHardBodyShapeRSOScreenableScreenable.catalogScreenable.catalog_idScreenable.coverage_levelScreenable.coverage_ratioScreenable.ephemerisScreenable.ephemeris_groupScreenable.ephemeris_idScreenable.external_catalogScreenable.norad_idScreenable.propagationScreenable.propagation_idScreenable.usable_time_endScreenable.usable_time_start
ScreeningScreening.completed_atScreening.conjunctions_countScreening.coverage_levelScreening.coverage_ratioScreening.created_atScreening.idScreening.percent_completeScreening.primaries_countScreening.primary_ids_previewScreening.primary_rsos_previewScreening.screening_typeScreening.secondaries_countScreening.started_atScreening.statusScreening.updated_at
ScreeningConfigurationScreeningConfiguration.auto_archiveScreeningConfiguration.default_secondary_hbr_mScreeningConfiguration.hard_body_shapeScreeningConfiguration.include_primary_vs_primaryScreeningConfiguration.launch_window_cadence_sScreeningConfiguration.launch_window_endScreeningConfiguration.launch_window_startScreeningConfiguration.notesScreeningConfiguration.propagation_start_timeScreeningConfiguration.screening_typeScreeningConfiguration.threshold_radius_active_kmScreeningConfiguration.threshold_radius_debris_kmScreeningConfiguration.threshold_radius_kmScreeningConfiguration.threshold_radius_manned_kmScreeningConfiguration.title
ScreeningTypeScreeningClientScreeningClient.add_screening_primary()ScreeningClient.add_screening_secondary()ScreeningClient.await_screening_completion()ScreeningClient.await_screening_completion_percent_generator()ScreeningClient.clientScreeningClient.create_ephemeris()ScreeningClient.create_screening()ScreeningClient.download_ephemeris()ScreeningClient.get_api_spec()ScreeningClient.get_catalog()ScreeningClient.get_conjunction_ccsds()ScreeningClient.get_ephemeris()ScreeningClient.get_latest_catalog()ScreeningClient.get_screening()ScreeningClient.list_catalog_ephemerides()ScreeningClient.list_catalogs()ScreeningClient.list_conjunctions()ScreeningClient.list_conjunctions_ccsds()ScreeningClient.list_ephemerides()ScreeningClient.list_ephemeris_formats()ScreeningClient.list_screening_primaries()ScreeningClient.list_screening_secondaries()ScreeningClient.list_screenings()ScreeningClient.operationalize_ephemeris()ScreeningClient.resolve_to_screenable()ScreeningClient.submit_screening()
- Submodules
Submodules#
- class satcat.sdk.client.Client(default_page_size=32)#
Bases:
objectBase Client class which may be used to make requests to Satcat APIs. May be used as a context manager with the
withkeyword:with Client() as client: client.request(...)
If not used with the
withkeyword, it is recommended to explicitly close the Client withclient.close()after the application is finished making requests.- Parameters:
default_page_size (
int) – Default page size to use when sending repeated listing requests to a collection endpoint, defaults to 10
- authenticate_session(timeout_s=None)#
- Authenticate the HTTP session with the authentication provider using the
authentication method determined by
satcat.sdk.settings.auth_method.
This is done automatically when using
request_authenticated.
- close()#
Close the client and any associated network connections.
- property cola_maneuvers: ColaManeuverClient#
Library containing SDK functions for interacting with the Satcat COLA Maneuver Designer API.
- create_ephemeris(*args, **kwargs)#
Alias for
client.screening.create_ephemeris.
- download_ephemeris(*args, **kwargs)#
Alias for
client.screening.download_ephemeris.
- property events: EventClient#
Library containing SDK functions for interacting with the Satcat Events API.
- get_ephemeris(*args, **kwargs)#
Alias for
client.screening.get_ephemeris.
- list_ephemerides(*args, **kwargs)#
Alias for
client.screening.list_ephemerides.
- operationalize_ephemeris(*args, **kwargs)#
Alias for
client.screening.operationalize_ephemeris.
- ping_authenticated()#
Sends a request to Kayhan servers to confirm a healthy and authenticated session. Returns True if valid, raises an HTTPError if not.
- Return type:
bool
- property propagation: PropagationClient#
Library containing SDK functions for interacting with the Satcat Propagation API.
- request(path, method='GET', data=None, json=None, params=None, files=None, api='rest')#
Make an HTTP request to a Satcat API. .. warning:: For most use cases, this function should only be called internally by high level functions inside the SDK, such as those inside
client.screening.- Return type:
Response
- request_authenticated(path, method='GET', data=None, json=None, params=None, ignore_failure=False, files=None, api='rest')#
- Return type:
Response
- Ensure that the HTTP session is authorized and make an HTTP request to
a Satcat API.
Warning
For most use cases, this function should only be called internally by high level functions inside the SDK, such as those inside
client.screening.
- request_list(path, filters=None, count=None, params=None, sort_direction=SortDirection.DESC, sort_field='created_at', fields=None)#
- Return type:
Collection[Any]
- Request a list of resources from a Satcat API and automatically page through
the results if necessary.
Warning
For most use cases, this function should only be called internally by high level functions inside the SDK, such as those inside
client.screening.
- property screening: ScreeningClient#
Library containing SDK functions for interacting with the Satcat Screening API.
-
session:
Session#
- satcat.sdk.client.check_version()#
- satcat.sdk.client.get_latest_version(package_name)#
- Return type:
str
- class satcat.sdk.models.Model(**data)#
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- class satcat.sdk.od_client.ODClient(client)#
Bases:
object- download_file(object_id, filename, output_path)#
Download an orbital determination (OD) file for a specific object.
- Parameters:
object_id (int) – The NORAD ID or temporary ID of the object that this OD file describes.
filename (str) – The name of the file to download.
output_path (Optional[PathLike]) – Optional path to save the downloaded file. If None, the file content is returned as bytes.
- Returns:
The content of the downloaded file as bytes.
- Return type:
bytes
- download_recent_files(object_id, number=1, report=False, output_dir=None)#
Download the most recent orbital determination (OD) files for a specific object.
- Parameters:
object_id (int) – The NORAD ID or temporary ID of the object that this OD file describes.
number (int) – The number of recent files to download.
report (bool) – If True, downloads the most recent pdf report file as well
output_dir (Optional[PathLike]) – Optional directory to save the downloaded files. If None, files are saved to the current working directory.
- Returns:
A tuple containing the count of definitive files, predictive files, and a boolean indicating if a PDF report was downloaded.
- Return type:
Tuple[int, int, bool]
- list_assets()#
List assets for which the user has orbital determination data available.
:return The list of object IDs. :rtype: Collection[int]
- list_object_files(object_id, today=False, results=False)#
List orbital determination files for a specific object.
- Parameters:
object_id (int) – The NORAD ID or temporary ID of the object.
today (bool) – If True, only list files uploaded today.
results (bool) – If True, only list result files.
- Returns:
The list of files for the specified object.
- Return type:
Collection[Dict[str, Any]]
- upload_file(object_id, path_or_buf, filename=None)#
Upload an orbital determination (OD) file for a specific object.
The file content can be provided either as a filesystem path or as an already-open file-like object. A filename must either be provided explicitly or derivable from
path_or_buf; otherwise this method will raise aValueError.- Parameters:
object_id (int) – The NORAD ID or temporary ID of the object that this OD file describes.
path_or_buf (Union[PathLike, TextIO, StringIO]) – Path to a file on disk, or an open text file-like object (e.g.
io.StringIO) containing the OD data to upload.filename (Optional[str]) –
Optional explicit filename to send to the API. If not provided, the filename will be derived from
path_or_bufwhen possible (e.g. usingos.path.basename). The filename must follow one of these patterns:gnss_<object_id>_YYYY_MM_DD_HH_MM_SSZ.(json|csv|navsol) gnss_<object_id>_YYYY-MM-DDTHH:MM:SSZ.(json|csv|navsol) maneuver_<object_id>_YYYY_MM_DD_HH_MM_SSZ.(opm|txt) maneuver_<object_id>_YYYY-MM-DDTHH:MM:SSZ.(opm|txt)
If no filename can be determined, a
ValueErroris raised.
- Returns:
The JSON response from the OD upload endpoint.
- Return type:
Dict[str, Any]
- class satcat.sdk.settings.CLISettings(**data)#
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
-
is_cli:
bool#
-
output_format:
OutputFormat#
-
show_progress:
bool#
-
is_cli:
- class satcat.sdk.settings.OutputFormat(value)#
Bases:
str,EnumAn enumeration.
- JSON = 'json'#
- RICH = 'rich'#
- class satcat.sdk.settings.Settings(_env_file='<object object>', _env_file_encoding=None, _env_nested_delimiter=None, _secrets_dir=None, **values)#
Bases:
BaseSettingsCreate a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- class Config#
Bases:
object- classmethod customise_sources(init_settings, env_settings, file_secret_settings)#
- env_file_encoding = 'utf-8'#
- env_prefix = 'satcat_'#
- extra = 'allow'#
-
auth_client_id:
Optional[str]#
-
auth_client_secret:
Optional[str]#
-
auth_method:
Literal['password','client_credentials']#
-
auth_password:
Optional[str]#
-
auth_url:
AnyUrl#
-
auth_username:
Optional[str]#
-
cli:
CLISettings#
-
default_timeout:
int#
-
satcat_base_url:
AnyUrl#
- classmethod satcat_base_url_must_end_with_slash(v)#
- property satcat_rest_api_url: str#
-
satcat_rest_api_url_override:
Optional[AnyUrl]#
- property satcat_web_api_url: str#
-
satcat_web_api_url_override:
Optional[AnyUrl]#
- satcat.sdk.settings.json_config_settings_source(settings)#
A simple settings source that loads variables from a JSON file at the project’s root.
Here we happen to choose to use the env_file_encoding from Config when reading config.json
- Return type:
Dict[str,Any]
- satcat.sdk.settings.load_settings_file(config_path)#
- exception satcat.sdk.utils.NotFoundError#
Bases:
Exception
- class satcat.sdk.utils.SortDirection(value)#
Bases:
EnumAn enumeration.
- ASC = 'asc'#
- DESC = 'desc'#
- satcat.sdk.utils.kebab_case(text)#
- Return type:
str
- class satcat.sdk.utils.open_path_or_buf(path_or_buf, mode='r')#
Bases:
object-
buf:
IO#
-
need_to_close_buf:
bool= False#
-
path_or_buf:
Union[Path,IO]#
-
buf:
- satcat.sdk.utils.poll_job_for_completion(get_job_fn, poll_interval=5, timeout=3600, created_timeout=30)#
- satcat.sdk.utils.poll_job_for_completion_percent_generator(get_job_fn, poll_interval=5, timeout=3600)#
- satcat.sdk.utils.remove_none_vals(d)#
- Return type:
Dict
- satcat.sdk.utils.utc(timestamp)#
Create a datetime object from an ISO8601 timestamp string. The timestamp string must include the “Z” suffix indicating that the timestamp is expressed in the UTC time system.
It is recommended that you use this function to pass any datetime parameters to Satcat SDK functions to ensure that your datetime is created with the correct timezone information.
- Parameters:
timestamp (str) – The timestamp string to convert
- Returns:
The created datetime object
- Return type:
datetime