Skip to content

Blocks Catalog

Below is a list of Blocks available for registration in prefect-planetary-computer.

To register blocks in this module to view and edit them on Prefect Cloud, first install the required packages, then

prefect block register -m prefect_planetary_computer
Note, to use the load method on Blocks, you must already have a block document saved through code or saved through the UI.

Credentials Module

PlanetaryComputerCredentials

Block used to manage Microsoft Planetary Computer credentials.

The block stores a subscription key to access the full PC data catalog and a JupyterHub API token to instantiate clusters through Dask Gateway.

To load the PlanetaryComputerCredentials:

from prefect import flow
from prefect_planetary_computer.credentials import PlanetaryComputerCredentials

@flow
def my_flow():
    my_block = PlanetaryComputerCredentials.load("MY_BLOCK_NAME")

my_flow()
For additional examples, check out the Credentials Module under Examples Catalog.