Ivan Carrion
09/14/2025, 4:10 PMMarvin
09/14/2025, 4:10 PMMarvin
09/14/2025, 4:15 PMprefect block type ls
- Register block types from a module/file: prefect block register -m <module> or -f <file.py>
- Open a link to create a block in the UI: prefect block create <block_type_slug>
- List configured blocks: prefect block ls
- Inspect a block: prefect block inspect
- Delete a block: prefect block delete
Docs: CLI: prefect block
- Python API (example):
from prefect.blocks.system import Secret
Secret(value="super-secret").save("my-secret", overwrite=True)
Referencing blocks from prefect.yaml
- While you can’t define blocks in YAML, you can reference existing blocks in your deployment steps (e.g., to pull code with credentials or read from object storage). If you share which integration you’re using (AWS, GitHub, GCS, etc.), I can provide a precise snippet for your case.
Related docs
- Blocks overview: Blocks concepts
- prefect.yaml guide: prefect.yaml guide