Registry / http-networking / async-upnp-client

async-upnp-client

JSON →
library0.47.0pypypiunverified

Async UPnP Client library for Python, implementing UPnP (Universal Plug and Play) protocol asynchronously using asyncio. Current version 0.47.0, release cadence is irregular, roughly monthly. Requires Python >=3.10.

pip install async-upnp-client
INSTALL
IMPORT
SIG · ASYNC-UPNP-CLIENT
A
async-upnp-client
http-networkingpythonv0.47.0
Install
4.1s avg
Import
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.47.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.1s · import 0.000s · 30MB
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

UPnPDevice
from async_upnp_client import UPnPDevice
from async_upnp_client import UPnPDevice

Basic setup to instantiate a UPnP factory and requester.

import asyncio from async_upnp_client import UPnPFactory, UPnPRequester async def main(): requester = UPnPRequester() factory = UPnPFactory(requester) # Discover devices, for example: # device = await factory.create_device("http://192.168.1.1:49152/description.xml") print("UPnP client ready") asyncio.run(main())
Debug
Known issues
breakingVersion 0.47.0 removed deprecated classmethods from UPnPDevice and UPnPService. Use factory pattern instead.
fix
Use UPnPFactory.create_device() and UPnPService.from_device() instead of classmethods.
affects: >=0.47.0
gotchaThe library uses async/await exclusively. Mixing synchronous code will cause RuntimeError or deadlocks.
fix
Ensure all calls to async methods are awaited within an async context.
affects: all
deprecatedUPnPRequester is deprecated in favor of aiohttp session-based approach. Future versions may remove it.
fix
Use aiohttp.ClientSession directly and pass to factory.
affects: >=0.47.0
gotchaUPnP device discovery using SSDP may require root privileges on some systems (e.g., Linux) due to port binding.
fix
Run the script as root or use `sudo` for discovery. Alternatively, hardcode device URL.
affects: all
Upgrade
Version history
0.47.0latest on PyPI · released Apr 19, 2026
Audit
Dependencies
aiohttprequiredHTTP client used for UPnP requests
async-timeoutrequiredTimeout handling for async operations
defusedxmlrequiredSafe XML parsing for UPnP responses
voluptuousoptionalSchema validation for device descriptions
Agent activity
21 hits · last 30 days
node
16
OpenAI (training)
1
Resources
async-upnp-client — pip install async-upnp-client · libregistry