Riccardo Tesselli
07/19/2022, 1:16 PMalex
07/19/2022, 2:00 PMregister_type_and_schema
method. Here’s an example:
from prefect.blocks.core import Block
class Custom(Block):
value: str
Custom.register_type_and_schema()
Running this script will register the Custom
block for configuration in the UI. We’re working on building out the capability to register blocks via the CLI, so this process should improve in the future.
For deleting custom block types, you’ll need to use the REST API for now. Here’s a link to the documentation for the endpoint that handles deleting block types: https://orion-docs.prefect.io/api-ref/rest-api/#/Block%20types/delete_block_type_block_types__id__delete.Riccardo Tesselli
07/19/2022, 2:33 PMasyncio.run(Custom.register_type_and_schema())
Anna Geller
07/19/2022, 11:18 PM