rs_server_adgs.api package

Submodules

rs_server_adgs.api.adgs_download module

Module used to download AUX files from ADGS station.

class rs_server_adgs.api.adgs_download.AdgsDownloadResponse(*, started: bool)

Bases: BaseModel

Endpoint response

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'started': FieldInfo(annotation=bool, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

started: bool
rs_server_adgs.api.adgs_download.download_products(request: Request, name: str, local: str | None = None, obs: str | None = None, db: Session = Depends(get_db))

Initiate an asynchronous download process for an ADGS product using EODAG.

This endpoint triggers the download of an ADGS product identified by the given name of the file. It starts the download process in a separate thread using the start_eodag_download function and updates the product’s status in the database.

Parameters:

db (Database) – The database connection object.

Returns:

A dictionary indicating whether the download process has started.

Return type:

dict

Raises:

None

rs_server_adgs.api.adgs_download.start_eodag_download(argument: EoDAGDownloadHandler)

Start the eodag download process.

This function initiates the eodag download process using the provided arguments. It sets up the temporary directory where the files are to be downloaded and gets the database handler

Parameters:

argument (EoDAGDownloadHandler) – An instance of EoDAGDownloadHandler containing the arguments used in the downloading process

Returns:

None

rs_server_adgs.api.adgs_status module

HTTP endpoints to get the downloading status from ADGS stations.

rs_server_adgs.api.adgs_status.get_download_status(request: Request, name: str, db: Session = Depends(get_db))

Get a product download status from its ID or name.

Parameters:

db (Session) – database session

Module contents

ADGS endpoints package.