duck.utils.port_recorder

Module for recording and managing used ports within your web application.

Module Contents

Classes

PortRecorder

Class to record all ports that will be of use within Duck entire life cycle.

API

class duck.utils.port_recorder.PortRecorder[source]

Class to record all ports that will be of use within Duck entire life cycle.

OCCUPIED_PORTS: dict[int, str]

None

Dict of occupied ports mapping to their occupiers.

classmethod add_new_occupied_port(port: int, occupier: str)[source]

Adds new port as an occupied port (already in use port).