1.2.6. insupdel4stac.updater module#

class insupdel4stac.updater.Updater(collections_list: list, service_type: str, table_details: list | None = None, loader: Loader | None = None, pgstacdb: PgstacDB | None = None, pgstac_properties: dict | None = None, stacapi_properties: dict | None = None, logger_properties: dict | None = None)[source]#

Bases: object

This is a class for updating items and collections in pgSTAC and STAC-API.

Parameters:
  • collections_list (list) – A list of collections to be updated.

  • service_type (str) – The service type to be used for updating. It can be pgstac or stacapi.

  • table_details (list, optional) – A list of dictionaries that contains the details of the tables. Defaults to None.

  • loader (Loader, optional) – The loader object to be used for updating.

  • ppgstacdb (PgstacDB, optional) – The pgstacdb object to be used for updating.

  • pgstac_properties (dict, optional) – The properties of pgstac. Defaults to None.

  • stacapi_properties (dict, optional) – The properties of stacapi. Defaults to None.

  • logger_properties (dict, optional) – The properties of logger. Defaults to None.

pgstac_collection_update(collection_self_path: str, loader: Loader)[source]#

This function updates the collections in pgSTAC.

pgstac_item_update(item: Item, PgstacDB: PgstacDB)[source]#

This function updates the items in pgSTAC.

stacapi_collection_update(collection: Collection)[source]#

This function updates the collections in STAC-API via PUT method.

stacapi_item_update(item: Item)[source]#

This function updates the items in STAC-API via PUT method.

update(collection: Collection, service: str, loader: Loader | None = None, table_details: list | None = None)[source]#

This function updates the items and collections in pgSTAC and STAC-API according to the service_type and table_details.