WS-Discovery implementation for python
Project description
WS-Discovery in Python
This is WS-Discovery implementation for Python 2 & 3. It allows to discover services and to be discovered.
Authors and maintaining
Original version created by L.A. Fernando. Code was then forked and maintained by Andrei Kopats. Python3 port done by Pieter Jordaan. Packaging & major refactoring by Petri Savolainen. Python2 support fixes by Michael Leinartas.
Usage
A sample use of the module is shown below:
from wsdiscovery import WSDiscovery, QName, Scope
wsd = WSDiscovery()
wsd.start()
ttype = QName("abc", "def")
ttype1 = QName("namespace", "myTestService")
# Note: some devices scope services using onvif:// scheme, not http://
scope1 = Scope("http://myscope")
ttype2 = QName("namespace", "myOtherTestService_type1")
scope2 = Scope("http://other_scope")
xAddr = "localhost:8080/abc"
wsd.publishService(types=[ttype], scopes=[scope2], xAddrs=[xAddr])
#ret = wsd.searchServices(scopes=[scope1], timeout=10)
ret = wsd.searchServices()
for service in ret:
print(service.getEPR() + ":" + service.getXAddrs()[0])
wsd.stop()
Development state
This is not 100% complete and correct WS-Discovery implementation. It doesn't verify data received from the network. It may crash, and might contain security holes. No guarantees - test it carefully for your use case.
Changelog
1.0.0 (2018-12-18)
- Improved packaging (petri)
- Modularize & refactor (petri)
- Better Python2 support (mleinart)
0.2 (2017-05-19)
- First release @pypi (petri)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file WSDiscovery-1.0.0.tar.gz
.
File metadata
- Download URL: WSDiscovery-1.0.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91457d55a8b1886c7d747dc07522fb8b8b09a8bdb6e1f607cbe97ed332eca7a |
|
MD5 | bac01dcc8d202388d07057d0ccb7acdf |
|
BLAKE2b-256 | 46f1173762381603c2565f466bfb3883b2fb3fedcd8e653825305394f9b31b58 |
File details
Details for the file WSDiscovery-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: WSDiscovery-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 165366f5e43800fca6b3b926dd78be4ef9a8ef4168fb107882c948053d8946bc |
|
MD5 | 007f9890bf29b5a9899933b9d775609b |
|
BLAKE2b-256 | 2e5117be500e0700d0294202e30ddecabaf117a92268ee62ef5d88f55178917b |
File details
Details for the file WSDiscovery-1.0.0-py2-none-any.whl
.
File metadata
- Download URL: WSDiscovery-1.0.0-py2-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d6667c5c29ce68d63826a3b4ddcf3ac5b79712037c9baf3d269c83d409469f |
|
MD5 | 567302705d37f86e29ada5014fd04d52 |
|
BLAKE2b-256 | 728c233ebb009c5880a2c953dbbfa0662ac85ea742636ccbcfadc1d67f1414cb |