Last updated
Was this helpful?
Write and run your own logic in a Workflow with custom Python blocks.
When the built-in Blocks do not cover your use case, you can write your own logic in Python and run it as a Block inside a Workflow.
Custom Python blocks let you transform data, call external services, or implement bespoke logic without building and publishing a full plugin. The code lives inside the Workflow Definition itself and is compiled into a real Block at runtime. They run on self-hosted inference servers and on Dedicated Deployments, and on the Roboflow Serverless v2 API where they execute in isolated containers.
Local execution runs your code in your own inference deployment. Treat untrusted block code accordingly. To disable the feature entirely, set ALLOW_CUSTOM_PYTHON_EXECUTION_IN_WORKFLOWS=False.
Dynamic Python blocks - the full reference for defining a block inside a Workflow Definition: manifest, dynamic inputs and outputs, the run(...) and init(...) methods, state management, and debugging.
Create a Workflow block - write a proper Block class when you need versioning, batch processing, flow control, or custom dimensionality.
Bundling blocks into a plugin - package your Blocks into an installable plugin so a whole team or the community can use them.
Last updated
Was this helpful?
Was this helpful?