powermon.ports package

powermon / ports / __init__.py

class powermon.ports.PortType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: StrEnum

enumeration of supported / known port types

class powermon.ports.PortTypeDTO(*, port_type: PortType)

Bases: BaseModel

data transfer model for PortType class

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'port_type': FieldInfo(annotation=PortType, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

powermon.ports.from_config(port_config)

get a port object from config data

Submodules