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 them. Also it contains a convenient way to execute TR64 protocol actions on routers or other network devices which supports TR64.

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

or even easier, execute:

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

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

Features

  • 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

Installation

To install Simple TR64, simply:

$ pip install simpletr64

Documentation

Please, see the documentation here

Release History

1.0.0 (2015-12-30)

  • Birth!

Project details


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.tar.gz (20.2 kB view hashes)

Uploaded Source

Built Distribution

simpleTR64-1.0-py2.py3-none-any.whl (21.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page