skillfed

async-upnp-client

Async UPnP Client

async-upnp-client v0.48.0 149.0K downloads/30d#11,006 on PyPI54
Permissive license Apache-2.0 Active released

What it is and what it does

async-upnp-client is an asyncio-based UPnP client library for Python that discovers, describes, controls, and subscribes to events from UPnP devices on a network. It maps to the UPnP Device Architecture standard, providing modules for SSDP discovery, device description parsing, service control, and event handling. The library includes profiles for Internet Gateway Devices (IGD), DLNA media renderers, and printers, making it suitable for home automation and network device integration.

The package is built on aiohttp for HTTP communication, defusedxml for safe XML parsing, python-didl-lite for DLNA metadata, and voluptuous for validation. It exposes both a programmatic API for integration into larger applications and a command-line tool (upnp-client) for ad-hoc device discovery, action invocation, and event subscription. Originally developed for Home Assistant, it is production-ready and actively maintained.

Use it for:

  • Discover and control DLNA media renderers (speakers, TVs) from a Python application.
  • Query and manage Internet Gateway Device (IGD) settings like port forwarding and WAN status.
  • Build a home automation hub that listens for UPnP device advertisements and state changes.
  • Invoke UPnP service actions (e.g., GetVolume, Play) on networked devices programmatically.
  • Monitor printer status and capabilities via UPnP service subscriptions.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Async UPnP client library for discovering, controlling, and eventing with UPnP devices over asyncio, supporting DLNA, IGD, and printer profiles.

Yes. The library is actively maintained, production-stable, has no known vulnerabilities, low install friction, and a permissive license. Install it if you need to integrate UPnP device discovery or control into an asyncio application, particularly for DLNA or home automation use cases.

Install

async-upnp-client on PyPI

pip

pip install async-upnp-client

uv

uv add async-upnp-client

poetry

poetry add async-upnp-client

Installing async-upnp-client

Before you install

Low install friction with four straightforward dependencies. Active maintenance with a release 19 days ago and recent commits; the project is marked Production/Stable and supports current Python versions (3.10–3.14).

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

import asyncio
from async_upnp_client import UpnpFactory

async def main():
    factory = UpnpFactory()
    devices = await factory.async_search()
    for device in devices:
        print(device)

asyncio.run(main())

Requires Python 3.10 or later; asyncio event loop must be running.

Verify before relying

  • Whether the library fully implements all UPnP Device Architecture sections or has known gaps beyond what the description notes.
  • Performance characteristics when handling many concurrent device connections or subscriptions.
  • Compatibility with specific UPnP device types beyond the three profiles (IGD, DLNA, printer) mentioned.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — aiohttp, defusedxml, python-didl-lite, voluptuous
Maintenance actively maintained — 19 days since the last release
Last repo commit
First released
Downloads 149,019/month — #11,006 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: async_upnp_client-0.48.0-py3-none-any.whl

Keywords: ssdp, Simple Service Discovery Protocol, upnp, Universal Plug and Play

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

upnp client asynciodlna device controlssdp discovery asyncupnp device communicationhome automation upnpnetwork device discoveryasync device control
upnpdlnaasyncio

More Internet packages