Skip to main content

ConnectorEnvironment

Configure a connector environment for custom Flyte connectors.

Attributes

AttributeTypeDescription
typestring = "connector"The fixed identifier for the environment type, set to "connector" to distinguish it from other application environments.
port`intPort` = Port(port=8080, name="h2c")

Constructor

Signature

def ConnectorEnvironment(
include: List[str],
name: str,
image: str,
port: int | Port = Port(port=8080, name="h2c")
) - > null

Parameters

NameTypeDescription
includeList[str]List of file paths to connector modules to be converted to Python module names.
namestrThe name of the connector environment.
imagestrThe container image to use for the connector.
port`intPort` = Port(port=8080, name="h2c")

Methods


container_args()

@classmethod
def container_args(
serialize_context: [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext)
) - > List[str]

Generates the command-line arguments for the connector container, including port configurations and the list of Python modules to load.

Parameters

NameTypeDescription
serialize_context[SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext)The context object containing settings and state for the current serialization pass.

Returns

TypeDescription
List[str]A list of strings representing the CLI arguments, such as port numbers and dotted module names derived from the include paths.

container_cmd()

@classmethod
def container_cmd(
serialize_context: [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext),
parameter_overrides: list[[Parameter](../../parameter/parameter.md?sid=flyte_app__parameter_parameter)]| None = None
) - > List[str]

Determines the entrypoint command for the container by parsing the user-provided command or falling back to the parent class default.

Parameters

NameTypeDescription
serialize_context[SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext)The context object containing settings and state for the current serialization pass.
parameter_overrides`list[Parameter]None` = None

Returns

TypeDescription
List[str]A list of strings representing the command to execute when the container starts.