user: What is NodeTreeInterfaceSocket(NodeTreeInterfaceItem) and how is it used in Blender Python scripting?

assistant: # NodeTreeInterfaceSocket(NodeTreeInterfaceItem)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`NodeTreeInterfaceItem`](bpy.types.NodeTreeInterfaceItem.html#bpy.types.NodeTreeInterfaceItem "bpy.types.NodeTreeInterfaceItem")

subclasses —
[`NodeTreeInterfaceSocketBool`](bpy.types.NodeTreeInterfaceSocketBool.html#bpy.types.NodeTreeInterfaceSocketBool "bpy.types.NodeTreeInterfaceSocketBool"), [`NodeTreeInterfaceSocketBundle`](bpy.types.NodeTreeInterfaceSocketBundle.html#bpy.types.NodeTreeInterfaceSocketBundle "bpy.types.NodeTreeInterfaceSocketBundle"), [`NodeTreeInterfaceSocketClosure`](bpy.types.NodeTreeInterfaceSocketClosure.html#bpy.types.NodeTreeInterfaceSocketClosure "bpy.types.NodeTreeInterfaceSocketClosure"), [`NodeTreeInterfaceSocketCollection`](bpy.types.NodeTreeInterfaceSocketCollection.html#bpy.types.NodeTreeInterfaceSocketCollection "bpy.types.NodeTreeInterfaceSocketCollection"), [`NodeTreeInterfaceSocketColor`](bpy.types.NodeTreeInterfaceSocketColor.html#bpy.types.NodeTreeInterfaceSocketColor "bpy.types.NodeTreeInterfaceSocketColor"), [`NodeTreeInterfaceSocketFloat`](bpy.types.NodeTreeInterfaceSocketFloat.html#bpy.types.NodeTreeInterfaceSocketFloat "bpy.types.NodeTreeInterfaceSocketFloat"), [`NodeTreeInterfaceSocketFloatAngle`](bpy.types.NodeTreeInterfaceSocketFloatAngle.html#bpy.types.NodeTreeInterfaceSocketFloatAngle "bpy.types.NodeTreeInterfaceSocketFloatAngle"), [`NodeTreeInterfaceSocketFloatColorTemperature`](bpy.types.NodeTreeInterfaceSocketFloatColorTemperature.html#bpy.types.NodeTreeInterfaceSocketFloatColorTemperature "bpy.types.NodeTreeInterfaceSocketFloatColorTemperature"), [`NodeTreeInterfaceSocketFloatDistance`](bpy.types.NodeTreeInterfaceSocketFloatDistance.html#bpy.types.NodeTreeInterfaceSocketFloatDistance "bpy.types.NodeTreeInterfaceSocketFloatDistance"), [`NodeTreeInterfaceSocketFloatFactor`](bpy.types.NodeTreeInterfaceSocketFloatFactor.html#bpy.types.NodeTreeInterfaceSocketFloatFactor "bpy.types.NodeTreeInterfaceSocketFloatFactor"), [`NodeTreeInterfaceSocketFloatFrequency`](bpy.types.NodeTreeInterfaceSocketFloatFrequency.html#bpy.types.NodeTreeInterfaceSocketFloatFrequency "bpy.types.NodeTreeInterfaceSocketFloatFrequency"), [`NodeTreeInterfaceSocketFloatPercentage`](bpy.types.NodeTreeInterfaceSocketFloatPercentage.html#bpy.types.NodeTreeInterfaceSocketFloatPercentage "bpy.types.NodeTreeInterfaceSocketFloatPercentage"), [`NodeTreeInterfaceSocketFloatTime`](bpy.types.NodeTreeInterfaceSocketFloatTime.html#bpy.types.NodeTreeInterfaceSocketFloatTime "bpy.types.NodeTreeInterfaceSocketFloatTime"), [`NodeTreeInterfaceSocketFloatTimeAbsolute`](bpy.types.NodeTreeInterfaceSocketFloatTimeAbsolute.html#bpy.types.NodeTreeInterfaceSocketFloatTimeAbsolute "bpy.types.NodeTreeInterfaceSocketFloatTimeAbsolute"), [`NodeTreeInterfaceSocketFloatUnsigned`](bpy.types.NodeTreeInterfaceSocketFloatUnsigned.html#bpy.types.NodeTreeInterfaceSocketFloatUnsigned "bpy.types.NodeTreeInterfaceSocketFloatUnsigned"), [`NodeTreeInterfaceSocketFloatWavelength`](bpy.types.NodeTreeInterfaceSocketFloatWavelength.html#bpy.types.NodeTreeInterfaceSocketFloatWavelength "bpy.types.NodeTreeInterfaceSocketFloatWavelength"), [`NodeTreeInterfaceSocketGeometry`](bpy.types.NodeTreeInterfaceSocketGeometry.html#bpy.types.NodeTreeInterfaceSocketGeometry "bpy.types.NodeTreeInterfaceSocketGeometry"), [`NodeTreeInterfaceSocketImage`](bpy.types.NodeTreeInterfaceSocketImage.html#bpy.types.NodeTreeInterfaceSocketImage "bpy.types.NodeTreeInterfaceSocketImage"), [`NodeTreeInterfaceSocketInt`](bpy.types.NodeTreeInterfaceSocketInt.html#bpy.types.NodeTreeInterfaceSocketInt "bpy.types.NodeTreeInterfaceSocketInt"), [`NodeTreeInterfaceSocketIntFactor`](bpy.types.NodeTreeInterfaceSocketIntFactor.html#bpy.types.NodeTreeInterfaceSocketIntFactor "bpy.types.NodeTreeInterfaceSocketIntFactor"), [`NodeTreeInterfaceSocketIntPercentage`](bpy.types.NodeTreeInterfaceSocketIntPercentage.html#bpy.types.NodeTreeInterfaceSocketIntPercentage "bpy.types.NodeTreeInterfaceSocketIntPercentage"), [`NodeTreeInterfaceSocketIntUnsigned`](bpy.types.NodeTreeInterfaceSocketIntUnsigned.html#bpy.types.NodeTreeInterfaceSocketIntUnsigned "bpy.types.NodeTreeInterfaceSocketIntUnsigned"), [`NodeTreeInterfaceSocketMaterial`](bpy.types.NodeTreeInterfaceSocketMaterial.html#bpy.types.NodeTreeInterfaceSocketMaterial "bpy.types.NodeTreeInterfaceSocketMaterial"), [`NodeTreeInterfaceSocketMatrix`](bpy.types.NodeTreeInterfaceSocketMatrix.html#bpy.types.NodeTreeInterfaceSocketMatrix "bpy.types.NodeTreeInterfaceSocketMatrix"), [`NodeTreeInterfaceSocketMenu`](bpy.types.NodeTreeInterfaceSocketMenu.html#bpy.types.NodeTreeInterfaceSocketMenu "bpy.types.NodeTreeInterfaceSocketMenu"), [`NodeTreeInterfaceSocketObject`](bpy.types.NodeTreeInterfaceSocketObject.html#bpy.types.NodeTreeInterfaceSocketObject "bpy.types.NodeTreeInterfaceSocketObject"), [`NodeTreeInterfaceSocketRotation`](bpy.types.NodeTreeInterfaceSocketRotation.html#bpy.types.NodeTreeInterfaceSocketRotation "bpy.types.NodeTreeInterfaceSocketRotation"), [`NodeTreeInterfaceSocketShader`](bpy.types.NodeTreeInterfaceSocketShader.html#bpy.types.NodeTreeInterfaceSocketShader "bpy.types.NodeTreeInterfaceSocketShader"), [`NodeTreeInterfaceSocketString`](bpy.types.NodeTreeInterfaceSocketString.html#bpy.types.NodeTreeInterfaceSocketString "bpy.types.NodeTreeInterfaceSocketString"), [`NodeTreeInterfaceSocketStringFilePath`](bpy.types.NodeTreeInterfaceSocketStringFilePath.html#bpy.types.NodeTreeInterfaceSocketStringFilePath "bpy.types.NodeTreeInterfaceSocketStringFilePath"), [`NodeTreeInterfaceSocketTexture`](bpy.types.NodeTreeInterfaceSocketTexture.html#bpy.types.NodeTreeInterfaceSocketTexture "bpy.types.NodeTreeInterfaceSocketTexture"), [`NodeTreeInterfaceSocketVector`](bpy.types.NodeTreeInterfaceSocketVector.html#bpy.types.NodeTreeInterfaceSocketVector "bpy.types.NodeTreeInterfaceSocketVector"), [`NodeTreeInterfaceSocketVector2D`](bpy.types.NodeTreeInterfaceSocketVector2D.html#bpy.types.NodeTreeInterfaceSocketVector2D "bpy.types.NodeTreeInterfaceSocketVector2D"), [`NodeTreeInterfaceSocketVector4D`](bpy.types.NodeTreeInterfaceSocketVector4D.html#bpy.types.NodeTreeInterfaceSocketVector4D "bpy.types.NodeTreeInterfaceSocketVector4D"), [`NodeTreeInterfaceSocketVectorAcceleration`](bpy.types.NodeTreeInterfaceSocketVectorAcceleration.html#bpy.types.NodeTreeInterfaceSocketVectorAcceleration "bpy.types.NodeTreeInterfaceSocketVectorAcceleration"), [`NodeTreeInterfaceSocketVectorAcceleration2D`](bpy.types.NodeTreeInterfaceSocketVectorAcceleration2D.html#bpy.types.NodeTreeInterfaceSocketVectorAcceleration2D "bpy.types.NodeTreeInterfaceSocketVectorAcceleration2D"), [`NodeTreeInterfaceSocketVectorAcceleration4D`](bpy.types.NodeTreeInterfaceSocketVectorAcceleration4D.html#bpy.types.NodeTreeInterfaceSocketVectorAcceleration4D "bpy.types.NodeTreeInterfaceSocketVectorAcceleration4D"), [`NodeTreeInterfaceSocketVectorDirection`](bpy.types.NodeTreeInterfaceSocketVectorDirection.html#bpy.types.NodeTreeInterfaceSocketVectorDirection "bpy.types.NodeTreeInterfaceSocketVectorDirection"), [`NodeTreeInterfaceSocketVectorDirection2D`](bpy.types.NodeTreeInterfaceSocketVectorDirection2D.html#bpy.types.NodeTreeInterfaceSocketVectorDirection2D "bpy.types.NodeTreeInterfaceSocketVectorDirection2D"), [`NodeTreeInterfaceSocketVectorDirection4D`](bpy.types.NodeTreeInterfaceSocketVectorDirection4D.html#bpy.types.NodeTreeInterfaceSocketVectorDirection4D "bpy.types.NodeTreeInterfaceSocketVectorDirection4D"), [`NodeTreeInterfaceSocketVectorEuler`](bpy.types.NodeTreeInterfaceSocketVectorEuler.html#bpy.types.NodeTreeInterfaceSocketVectorEuler "bpy.types.NodeTreeInterfaceSocketVectorEuler"), [`NodeTreeInterfaceSocketVectorEuler2D`](bpy.types.NodeTreeInterfaceSocketVectorEuler2D.html#bpy.types.NodeTreeInterfaceSocketVectorEuler2D "bpy.types.NodeTreeInterfaceSocketVectorEuler2D"), [`NodeTreeInterfaceSocketVectorEuler4D`](bpy.types.NodeTreeInterfaceSocketVectorEuler4D.html#bpy.types.NodeTreeInterfaceSocketVectorEuler4D "bpy.types.NodeTreeInterfaceSocketVectorEuler4D"), [`NodeTreeInterfaceSocketVectorFactor`](bpy.types.NodeTreeInterfaceSocketVectorFactor.html#bpy.types.NodeTreeInterfaceSocketVectorFactor "bpy.types.NodeTreeInterfaceSocketVectorFactor"), [`NodeTreeInterfaceSocketVectorFactor2D`](bpy.types.NodeTreeInterfaceSocketVectorFactor2D.html#bpy.types.NodeTreeInterfaceSocketVectorFactor2D "bpy.types.NodeTreeInterfaceSocketVectorFactor2D"), [`NodeTreeInterfaceSocketVectorFactor4D`](bpy.types.NodeTreeInterfaceSocketVectorFactor4D.html#bpy.types.NodeTreeInterfaceSocketVectorFactor4D "bpy.types.NodeTreeInterfaceSocketVectorFactor4D"), [`NodeTreeInterfaceSocketVectorPercentage`](bpy.types.NodeTreeInterfaceSocketVectorPercentage.html#bpy.types.NodeTreeInterfaceSocketVectorPercentage "bpy.types.NodeTreeInterfaceSocketVectorPercentage"), [`NodeTreeInterfaceSocketVectorPercentage2D`](bpy.types.NodeTreeInterfaceSocketVectorPercentage2D.html#bpy.types.NodeTreeInterfaceSocketVectorPercentage2D "bpy.types.NodeTreeInterfaceSocketVectorPercentage2D"), [`NodeTreeInterfaceSocketVectorPercentage4D`](bpy.types.NodeTreeInterfaceSocketVectorPercentage4D.html#bpy.types.NodeTreeInterfaceSocketVectorPercentage4D "bpy.types.NodeTreeInterfaceSocketVectorPercentage4D"), [`NodeTreeInterfaceSocketVectorTranslation`](bpy.types.NodeTreeInterfaceSocketVectorTranslation.html#bpy.types.NodeTreeInterfaceSocketVectorTranslation "bpy.types.NodeTreeInterfaceSocketVectorTranslation"), [`NodeTreeInterfaceSocketVectorTranslation2D`](bpy.types.NodeTreeInterfaceSocketVectorTranslation2D.html#bpy.types.NodeTreeInterfaceSocketVectorTranslation2D "bpy.types.NodeTreeInterfaceSocketVectorTranslation2D"), [`NodeTreeInterfaceSocketVectorTranslation4D`](bpy.types.NodeTreeInterfaceSocketVectorTranslation4D.html#bpy.types.NodeTreeInterfaceSocketVectorTranslation4D "bpy.types.NodeTreeInterfaceSocketVectorTranslation4D"), [`NodeTreeInterfaceSocketVectorVelocity`](bpy.types.NodeTreeInterfaceSocketVectorVelocity.html#bpy.types.NodeTreeInterfaceSocketVectorVelocity "bpy.types.NodeTreeInterfaceSocketVectorVelocity"), [`NodeTreeInterfaceSocketVectorVelocity2D`](bpy.types.NodeTreeInterfaceSocketVectorVelocity2D.html#bpy.types.NodeTreeInterfaceSocketVectorVelocity2D "bpy.types.NodeTreeInterfaceSocketVectorVelocity2D"), [`NodeTreeInterfaceSocketVectorVelocity4D`](bpy.types.NodeTreeInterfaceSocketVectorVelocity4D.html#bpy.types.NodeTreeInterfaceSocketVectorVelocity4D "bpy.types.NodeTreeInterfaceSocketVectorVelocity4D"), [`NodeTreeInterfaceSocketVectorXYZ`](bpy.types.NodeTreeInterfaceSocketVectorXYZ.html#bpy.types.NodeTreeInterfaceSocketVectorXYZ "bpy.types.NodeTreeInterfaceSocketVectorXYZ"), [`NodeTreeInterfaceSocketVectorXYZ2D`](bpy.types.NodeTreeInterfaceSocketVectorXYZ2D.html#bpy.types.NodeTreeInterfaceSocketVectorXYZ2D "bpy.types.NodeTreeInterfaceSocketVectorXYZ2D"), [`NodeTreeInterfaceSocketVectorXYZ4D`](bpy.types.NodeTreeInterfaceSocketVectorXYZ4D.html#bpy.types.NodeTreeInterfaceSocketVectorXYZ4D "bpy.types.NodeTreeInterfaceSocketVectorXYZ4D")

*class* bpy.types.NodeTreeInterfaceSocket(*NodeTreeInterfaceItem*)
:   Declaration of a node socket

    attribute_domain
    :   Attribute domain used by the geometry nodes modifier to create an attribute output

        Type:
        :   enum in [Attribute Domain Items](bpy_types_enum_items/attribute_domain_items.html#rna-enum-attribute-domain-items), default `'POINT'`

    bl_socket_idname
    :   Name of the socket type

        Type:
        :   string, default “”, (never None)

    default_attribute_name
    :   The attribute name used by default when the node group is used by a geometry nodes modifier

        Type:
        :   string, default “”, (never None)

    default_input
    :   Input to use when the socket is unconnected. Requires “Hide Value”.

        - `VALUE`
          Default Value – The node socket’s default value.
        - `INDEX`
          Index – The index from the context.
        - `ID_OR_INDEX`
          ID or Index – The “id” attribute if available, otherwise the index.
        - `NORMAL`
          Normal – The geometry’s normal direction.
        - `POSITION`
          Position – The position from the context.
        - `INSTANCE_TRANSFORM`
          Instance Transform – Transformation of each instance from the geometry context.
        - `HANDLE_LEFT`
          Left Handle – The left Bézier control point handle from the context.
        - `HANDLE_RIGHT`
          Right Handle – The right Bézier control point handle from the context.

        Type:
        :   enum in [`'VALUE'`, `'INDEX'`, `'ID_OR_INDEX'`, `'NORMAL'`, `'POSITION'`, `'INSTANCE_TRANSFORM'`, `'HANDLE_LEFT'`, `'HANDLE_RIGHT'`], default `'VALUE'`

    description
    :   Socket description

        Type:
        :   string, default “”, (never None)

    force_non_field
    :   Only allow single value inputs rather than field.
        Deprecated. Will be remove in 5.0.

        Type:
        :   boolean, default False

    hide_in_modifier
    :   Don’t show the input value in the geometry nodes modifier interface

        Type:
        :   boolean, default False

    hide_value
    :   Hide the socket input value even when the socket is not connected

        Type:
        :   boolean, default False

    identifier
    :   Unique identifier for mapping sockets

        Type:
        :   string, default “”, (readonly, never None)

    in_out
    :   Input or output socket type

        - `INPUT`
          Input – Generate a input node socket.
        - `OUTPUT`
          Output – Generate a output node socket.

        Type:
        :   enum in [`'INPUT'`, `'OUTPUT'`], default `'INPUT'`, (readonly)

    is_inspect_output
    :   Take link out of node group to connect to root tree output node

        Type:
        :   boolean, default False

    is_panel_toggle
    :   This socket is meant to be used as the toggle in its panel header

        Type:
        :   boolean, default False

    layer_selection_field
    :   Take Grease Pencil Layer or Layer Group as selection field

        Type:
        :   boolean, default False

    menu_expanded
    :   Draw the menu socket as an expanded drop-down menu

        Type:
        :   boolean, default False

    name
    :   Socket name

        Type:
        :   string, default “”, (never None)

    optional_label
    :   Indicate that the label of this socket is not necessary to understand its meaning. This may result in the label being skipped in some cases

        Type:
        :   boolean, default False

    socket_type
    :   Type of the socket generated by this interface item

        Type:
        :   enum in [`'DEFAULT'`], default `'DEFAULT'`

    structure_type
    :   What kind of higher order types are expected to flow through this socket

        Type:
        :   enum in [Node Socket Structure Type Items](bpy_types_enum_items/node_socket_structure_type_items.html#rna-enum-node-socket-structure-type-items), default `'AUTO'`

    bl_system_properties_get(*\**, *do_create=False*)
    :   DEBUG ONLY. Internal access to runtime-defined RNA data storage, intended solely for testing and debugging purposes. Do not access it in regular scripting work, and in particular, do not assume that it contains writable data

        Parameters:
        :   **do_create** (*boolean**,* *(**optional**)*) – Ensure that system properties are created if they do not exist yet

        Returns:
        :   The system properties root container, or None if there are no system properties stored in this data yet, and its creation was not requested

        Return type:
        :   [`PropertyGroup`](bpy.types.PropertyGroup.html#bpy.types.PropertyGroup "bpy.types.PropertyGroup")

    draw(*context*, *layout*)
    :   Draw properties of the socket interface

        Parameters:
        :   **layout** ([`UILayout`](bpy.types.UILayout.html#bpy.types.UILayout "bpy.types.UILayout"), (never None)) – Layout, Layout in the UI

    init_socket(*node*, *socket*, *data_path*)
    :   Initialize a node socket instance

        Parameters:
        :   - **node** ([`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), (never None)) – Node, Node of the socket to initialize
            - **socket** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – Socket, Socket to initialize
            - **data_path** (*string**,* *(**never None**)*) – Data Path, Path to specialized socket data

    from_socket(*node*, *socket*)
    :   Setup template parameters from an existing socket

        Parameters:
        :   - **node** ([`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), (never None)) – Node, Node of the original socket
            - **socket** ([`NodeSocket`](bpy.types.NodeSocket.html#bpy.types.NodeSocket "bpy.types.NodeSocket"), (never None)) – Socket, Original socket

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   type