1.2.2. insupdel4stac.deleter module#

class insupdel4stac.deleter.Deleter(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 deleting items and collections from pgSTAC and STAC-API.

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

  • service_type (str) – The service type to be used for deleting. 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 deleting.

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

  • 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.

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

This function ingests the items and collections from pgSTAC and STAC-API according to the service_type and table_details.

pgstac_collection_delete(collection: Collection, PgstacDB: PgstacDB)[source]#

This function deletes the collection from pgSTAC.

pgstac_item_delete(item: Item, collection: Collection, PgstacDB: PgstacDB)[source]#

This function deletes the item from pgSTAC.

stacapi_collection_delete(collection: Collection)[source]#

This function deletes the collection from STAC-API via DELETE method.

stacapi_item_delete(item: Item, collection: Collection)[source]#

This function deletes the item from STAC-API via DELETE method.