<@ULVA73B9P> it's possible to use the Python code ...
# marvin-in-the-wild
p
@Marvin it's possible to use the Python code to get a block ID using the block name?
m
To get a block ID using the block name in Python, you can load the block using the combination of the block type slug and the block name (referred to as the block slug). Then, you can access the block's ID. Here is a code example:
Copy code
python
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/