def get_installed_pypackages():
    return {p.project_name.lower(): p for p in pkg_resources.working_set}
def get_dpo_proto(addr):
    if ip_address(addr).version == 6:
        return DpoProto.DPO_PROTO_IP6
    else:
        return DpoProto.DPO_PROTO_IP4