get_method_by_name

getmac.getmac.get_method_by_name(method_name)[source]

Get a Method class from METHODS by name.

The name is matched ignoring case. This is how FORCE_METHOD finds its method.

Parameters:

method_name (str) – name of the method class, e.g. "IpNeighborShow"

Return type:

Optional[type[Method]]

Returns:

The method class (not an instance), or None if there isn’t one with that name