rs_server_cadip.api package

Submodules

rs_server_cadip.api.cadip_download module

Module used to download CADU files from CADIP stations.

class rs_server_cadip.api.cadip_download.CadipDownloadResponse(*, 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_cadip.api.cadip_download.download_products(request: Request, name: str, station: str = Path(PydanticUndefined), local: str | None = None, obs: str | None = None, db: Session = Depends(get_db))

Initiate an asynchronous download process for a CADU product using EODAG.

This endpoint triggers the download of a CADU 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.

rs_server_cadip.api.cadip_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_cadip.api.cadip_status module

HTTP endpoints to get the downloading status from CADIP stations.

rs_server_cadip.api.cadip_status.get_download_status(request: Request, name: str, db: Session = Depends(get_db), station: str = Path(PydanticUndefined))

Get a product download status from its ID or name.

Parameters:

db (Session) – database session

Module contents

HTTP endpoints.