Patricio Navarro
08/20/2024, 9:48 AMMarvin
08/20/2024, 9:49 AMpython
from prefect.blocks.core import Block
# Load the block using the block slug in the format 'block-type/block-name'
block_slug = "json/life-the-universe-everything"
block = Block.load(block_slug)
# Access the block ID
block_id = block.id
print(f"The block ID is: {block_id}")
In this example, replace "json/life-the-universe-everything"
with the appropriate block slug for your block.
For detailed steps on working with blocks, you can refer to the Prefect documentation:
https://docs.prefect.io/latest/concepts/blocks/