Skip to main content

An easy to use UPnP TR64 protocol library

Project description

This library supports the discovery of UPnP devices in the local network and let you execute actions on them if the device supports any. Also it contains a convenient way to execute TR64 protocol actions on routers or other network devices which supports TR64.

>>> results =
>>> print(results[0])
LOC: SRV: urn:dslforum-org:device:InternetGatewayDevice:1
>>> device = simpletr64.DeviceTR64(hostname=, port=49000)
>>> device.execute("/upnp/control/hosts", "urn:dslforum-org:service:Hosts:1", "GetGenericHostEntry", NewIndex=1)
{'NewActive': '0', 'NewIPAddress': '', 'NewMACAddress': '9C:20:7B:E7:FF:5F', 'NewInterfaceType':
    'Ethernet', 'NewHostName': 'Apple-TV', 'NewAddressSource': 'DHCP', 'NewLeaseTimeRemaining': '0'}

or even easier, execute:

>>> device = DeviceTR64("")
>>> device.setupTR64Device("")
>>> system = System(device)
>>> print(system.getSystemInfo().manufactureName)

Also please see the tools which have been provided with this library, these demonstrates the full functionality.


  • Discovery of UPnP devices in the local network

  • Gathering of UPnP device information’s

  • Executing of UPnP actions

  • Authentication for username/password or password only

  • HTTP(S) proxy support

  • Unicode


To install Simple TR64, simply:

$ pip install simpletr64


Please, see the documentation here

Release History

1.0.1 (2016-01-04)

  • Added better error reporting

  • Added timeout to any network interaction

  • added the possibility to discover more than one service at the same time

  • fixed getHostDetailsByMACAddress()

1.0.0 (2016-01-02)

  • Birth!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpleTR64-1.0.1.tar.gz (18.2 kB view hashes)

Uploaded source

Built Distribution

simpleTR64-1.0.1-py2.py3-none-any.whl (22.1 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page