Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColorunset
Anchor
opalone._internal.ports.Port
opalone._internal.ports.Port
class opalone._internal.ports.Port(port_id, model_id=None, port_type=None)
Panel
bgColorunset

Bases: Resource

A port is a part of a Block which allows interconnecting multiple blocks together.

Parameters:
  • port_id (str) – The ID of the port.

  • model_id (str) – The ID of the model containing this port.

  • port_type (str) – The type of port.

Panel
bgColorunset
Anchor
opalone._internal.ports.Port.delete
opalone._internal.ports.Port.delete
delete()
Panel
bgColorunset

Delete the current port.

This function does nothing for now, since a port deletion is not supported. To delete a port, the user must delete the Block owning the port.

Panel
bgColorunset
Anchor
opalone._internal.ports.Port.to_json
opalone._internal.ports.Port.to_json
to_json(fields, values)
Panel
bgColorunset

Convert this resource to a serialized JSON representation.

Parameters:
  • fields (tuple[str] | list[str]) – Fields to include.

  • values (tuple[object] | list[object]) – The value of each field

Returns:

The serialized JSON representation.

Return type:

str

Panel
bgColorunset
Anchor
opalone._internal.ports.Port.id
opalone._internal.ports.Port.id
property id: str
Panel
bgColorunset

The ID of the resource.

This property is read-only, it cannot be modified.