Skip to content

The CustomBlock class

PPPDUD edited this page Apr 6, 2026 · 2 revisions

The CustomBlock class contains information on a custom block definition.

data property

The data property is a dictionary containing internal information about the custom block definition. Its contents are not guaranteed to be consistent across versions or project files, so it should not be used in production code.

spec property

The spec property contains a machine-readable block specification (for example, draw circle of size %s light source %s rainbow? %b). snap-parser cannot parse these as of writing.

type property

A string containing the block type (for example, command for a command block).

category property

A string containing the parent category (for example, pen for a Pen block).

Clone this wiki locally