Hint

You can run this notebook in a live session with Binder Helmholtz.

  • it is important to acknowledge that the utilization of the Helmholtz is restricted to individuals who possess the necessary credentials as Helmholtz users. It is highly recommended to utilize the Python scipy option when constructing the environment in order to mitigate the occurrence of a 404 Bad request error.

INSUPDEL4STAC#

In this section, we present a set of illustrative examples that demonstrate the process of working with INSUPDEL4STAC.

Warning

To execute INSUPDEL4STAC, it is necessary to have a running STAC-FastAPI or pgSTAC, and thereafter perform the ingestion, deletion, or updating of your STAC-Metadata.

First we need to install the package

[ ]:
pip install insupdel4stac

In this example, our objective is to ingest a STAC-Catalog using STAC-API and pgSTAC.

[ ]:
from insupdel4stac import INSUPDEL4STAC

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="pgstac",
    action="Insert",
    logger_properties={"logger_handler": "StreamHandler"},
)

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="stacapi",
    action="Insert",
    logger_properties={"logger_handler": "StreamHandler"},
)

In this example, our objective is to update the STAC-Catalog that we have already ingested using the STAC-API and pgSTAC.

[ ]:
from insupdel4stac import INSUPDEL4STAC

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="pgstac",
    action="Update",
    logger_properties={"logger_handler": "StreamHandler"},
)

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="stacapi",
    action="Update",
    logger_properties={"logger_handler": "StreamHandler"},
)

In this example, our objective is to remove the STAC-Catalog that we previously updated using the STAC-API and pgSTAC.

[ ]:
from insupdel4stac import INSUPDEL4STAC

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="pgstac",
    action="Delete",
    logger_properties={"logger_handler": "StreamHandler"},
)

InsUpDel4STAC(
    stac_dir="unittestdata/stac/",
    service_type="stacapi",
    action="Delete",
    logger_properties={"logger_handler": "StreamHandler"},
)