upnpy.upnp package¶
Submodules¶
upnpy.upnp.UPnP module¶
-
class
upnpy.upnp.UPnP.
UPnP
¶ Bases:
object
UPnP object
A UPnP object used for device discovery
-
discover
(delay=2, **headers)¶ Find UPnP devices on the network
Find available UPnP devices on the network by sending an M-SEARCH request.
- Parameters
delay (int) – Discovery delay, amount of time in seconds to wait for a reply from devices
headers – Optional headers for the request
- Returns
List of discovered devices
- Return type
list
-
get_igd
()¶ Get the Internet Gateway Device if available
Gets the Internet Gateway device if it’s available after discovery.
- Returns
The IGD if successful or raises a upnpy.exceptions.IGDError exception upon failure
- Return type
-