from zenml.enums import StackComponentType
from zenml.integrations.constants import <EXAMPLE_INTEGRATION>
from zenml.integrations.integration import Integration
from zenml.zen_stores.models import FlavorWrapper
# This is the flavor that will be used when registering this stack component
# `zenml <type-of-stack-component> register ... -f example-orchestrator-flavor`
EXAMPLE_ORCHESTRATOR_FLAVOR = <"example-orchestrator-flavor">
# Create a Subclass of the Integration Class
class ExampleIntegration(Integration):
"""Definition of Example Integration for ZenML."""
NAME = <EXAMPLE_INTEGRATION>
REQUIREMENTS = ["<INSERT PYTHON REQUIREMENTS HERE>"]
def flavors(cls) -> List[FlavorWrapper]:
"""Declare the stack component flavors for the <EXAMPLE> integration."""
# Create a FlavorWrapper for each Stack Component this Integration implements
name=EXAMPLE_ORCHESTRATOR_FLAVOR,
source="<path.to.the.implementation.of.the.component", # Give the source of the component implementation
type=StackComponentType.<TYPE-OF-STACK-COMPONENT>, # Define which component is implemented
ExampleIntegration.check_installation() # this checks if the requirements are installed