Skip to main content

Port

This class represents a network port configuration, consisting of a port number and an optional descriptive name. It ensures data integrity by validating the port number against a list of restricted application ports during initialization.

Attributes​

AttributeTypeDescription
portintThe network port number used for the application, which must not be one of the reserved invalid ports.
nameOptional[str] = nullAn optional display label or identifier assigned to the port for reference.

Constructor​

Signature​

def Port(
port: int,
name: Optional[str] = None
) -> null

Parameters​

NameTypeDescription
portintThe network port number to be assigned.
nameOptional[str] = NoneAn optional descriptive name for the port.