使用 Python 发现 Web 服务
我的网络上有多个设备。我正在尝试使用一个库来使用 Python 脚本发现这些设备的存在和实体,这些设备都有一个 Web 服务。我的问题是,有没有任何模块可以帮助我解决这个问题,因为我找到的唯一模块是Python的ws-discovery?
如果这是唯一的模块,是否有人有任何使用 ws-discovery 的示例 Python 脚本?
感谢您的任何帮助。
I have several devices on a network. I am trying to use a library to discover the presence and itentity of these devices using Python script, the devices all have a web service. My question is, are there any modules that would help me with this problem as the only module I have found is ws-discovery for Python?
And if this is the only module does anyone have any example Python script using ws-discovery?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,我自己从未使用过 ws-discovery,但似乎有一个 Python 项目实现了它:
https://pypi.org/project/WSDiscovery/
从他们的文档中,这里有一个关于如何进行操作的简短示例使用它:
Unfortunately I've never used ws-discovery myself, but there seems to be a Python project which implements it:
https://pypi.org/project/WSDiscovery/
From their documentation here's a short example on how to use it:
您与 ws-discovery 有联系吗?如果没有,您可能需要考虑 Bonjour 协议,又名 ZeroConf 和 DNS-SD。该协议的实施相对广泛。我从未使用过 python 来做广告或发现,但有一个实现 API 的项目: http ://code.google.com/p/pybonjour/
正如我所说,我对这个项目没有直接的经验,只是指出它作为 ws-discovery 的替代方案。
Are you tied to ws-discovery? If not, you might want to consider the Bonjour protocol, aka ZeroConf and DNS-SD. The protocol is relatively widely implemented. I've never used python to do the advertising or discovery but there is a project that implements an API: http://code.google.com/p/pybonjour/
As I said, I have no direct experience with this project and merely point it out as an alternative to ws-discovery.