SSDPy: Python SSDP library

SSDPy is a lightweight implementation of SSDP (Simple Service Discovery Protocol). It is designed for ease of use and high compatibility with the protocol in real-life use. It supports both the IETF and UPnP versions of the protocol. You can read the full documentation here.
Example usage
Send an SSDP discover packet (M-SEARCH):
>>> from ssdpy import SSDPClient
>>> client = SSDPClient()
>>> devices = client.m_search("ssdp:all")
>>> for device in devices:
... print(device.get("usn"))
uuid:Dell-Printer-1_0-dsi-secretariat::urn:schemas-upnp-org:service:PrintBasic:1
uuid:00000000-0000-0000-0200-00125A8A0960::urn:schemas-microsoft-com:nhed:presence:1
Send an SSDP NOTIFY packet, telling others about a service:
>>> from ssdpy import SSDPServer
>>> server = SSDPServer("my-service-identifier")
>>> server.notify()
Start an SSDP server which responds to relevant M-SEARCHes:
>>> from ssdpy import SSDPServer
>>> server = SSDPServer("my-service-identifier", device_type="my-device-type")
>>> server.serve_forever()
Then, from a client, M-SEARCH for our server:
>>> from ssdpy import SSDPClient
>>> client = SSDPClient()
>>> devices = client.m_search("my-device-type")
>>> for device in devices:
... print(device.get("usn"))
my-service-identifier
CLI utilities
SSDPy comes with two CLI utilities:
- ssdpy-server is a server that listens for M-SEARCHes and responds if they match its name.
- ssdpy-discover sends an M-SEARCH query and collects all responses.
Release checklist
- Update
ssdpy/version.pywith new version name. - Update
CHANGES.md. - Commit the changes, tag with version & push.
- Run
make release.
Links
- IETF draft of the protocl (still in use by some devices, e.g. redfish) https://tools.ietf.org/html/draft-cai-ssdp-v1-03
- UPnP Device Architecture 1.1 https://web.archive.org/web/20150905102426/http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf
- UPnP Device Architecture 2.0 https://web.archive.org/web/20151107123618/http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0.pdf
Metadata
Release files for ssdpy 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ssdpy-0.4.1.tar.gz | 10.6 kB | Without provenance | Details for ssdpy-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ssdpy-0.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for ssdpy-0.4.1-py2.py3-none-any.whl |
Total release size: 24.7 kB
Release files / ssdpy-0.4.1.tar.gz
| Download URL | ssdpy-0.4.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4971c6a010f77f147ecdbec9593f2d9187c3fb63658b0f5ec08f4c7be2387425
|
|
BLAKE2b-256 checksum How to use checksums |
e2646d9f8f5a41964bdc1702c958d57c172146bfd0d0b25c09fee0112c7378fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3
|
Release files / ssdpy-0.4.1-py2.py3-none-any.whl
| Download URL | ssdpy-0.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f2a84915140a8df9d9432e35a487c8712fe23158d278f90f72ed5bd49fcf2bb5
|
|
BLAKE2b-256 checksum How to use checksums |
2a76b1cd35d235243fffe1c03876f217e60ed611ff8f6ddede2a6f61d575f98b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3
|
Security for ssdpy 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.