skillfed

zeroconf

A pure python implementation of multicast DNS service discovery

zeroconf v0.150.0 3.3M downloads/30d#2,656 on PyPI734
Copyleft license LGPL-2.1-or-later Active released

What it is and what it does

Zeroconf is a pure-Python implementation of multicast DNS (mDNS) service discovery, allowing applications to discover and register services on local networks without external dependencies like Bonjour or Avahi. It uses asyncio under the hood but does not require the caller to manage an event loop explicitly. The package works across macOS, Linux, and Windows, and supports both CPython 3.10+ and PyPy 3.10+.

Typically used to browse for services (like HTTP servers, printers, or custom networked devices) by listening for mDNS announcements, or to register your own services so other devices can discover them. You instantiate a Zeroconf object, attach a ServiceListener to a ServiceBrowser for the service type you want to discover, and implement callbacks to handle service additions, removals, and updates. The library handles the underlying mDNS protocol and network I/O.

Use it for:

  • Discover HTTP services on a local network to build a dynamic service registry without manual configuration.
  • Register a Python application as a discoverable service so other devices on the network can find it automatically.
  • Browse for specific service types (e.g., _ssh._tcp.local., _printer._tcp.local.) to enumerate available resources.
  • Build a local network device discovery tool that works across macOS, Linux, and Windows without external system dependencies.
  • Implement zero-configuration networking for IoT or home automation scenarios where devices need to find each other.

Worth the install?

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

Discovers and registers services on local networks using multicast DNS (mDNS), without requiring Bonjour, Avahi, or D-Bus.

Yes. Zeroconf is actively maintained, has no known vulnerabilities, and solves a real problem (local network service discovery) without forcing external system dependencies. The copyleft license (LGPL-2.1-or-later) is permissive for most use cases. Medium install friction is acceptable for a package with prebuilt wheels across major platforms. Install it if you need mDNS discovery and want to avoid Bonjour or D-Bus.

Install

zeroconf on PyPI

pip

pip install zeroconf

uv

uv add zeroconf

poetry

poetry add zeroconf

Installing zeroconf

Before you install

Medium install friction due to compiled wheels for multiple platforms and architectures. Actively maintained with a recent release 53 days ago; last commit 2026-08-10. Single lightweight runtime dependency (ifaddr) keeps the dependency chain minimal.

License in practice

Licensed under LGPL-2.1-or-later (copyleft). You may use it under LGPL-2.1 or any later LGPL version published by the Free Software Foundation. Derivative works and modifications must be distributed under compatible terms.

Quickstart

pip install zeroconf

from zeroconf import ServiceBrowser, ServiceListener, Zeroconf

class MyListener(ServiceListener):
    def add_service(self, zc, type_, name):
        info = zc.get_service_info(type_, name)
        print(f"Service {name} added: {info}")

zeroconf = Zeroconf()
browser = ServiceBrowser(zeroconf, "_http._tcp.local.", MyListener())
# ... use browser ...
zeroconf.close()

Requires Python 3.10 or later (CPython or PyPy). Discovery and registration use all available network interfaces by default; customize via the `interfaces` argument when constructing Zeroconf.

Verify before relying

  • Whether the optional Cython extension is automatically built or requires manual compilation steps.
  • Performance characteristics and memory footprint under sustained service discovery on large networks.
  • IPv6 support limitations beyond the documented cases (localhost, dual-stack sockets, non-POSIX systems).

Package facts

License LGPL-2.1-or-later (copyleft)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — ifaddr
Maintenance actively maintained — 53 days since the last release
Last repo commit
First released
Downloads 3,335,601/month — #2,656 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zeroconf-0.150.0-cp310-cp310-macosx_11_0_arm64.whl; zeroconf-0.150.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; zeroconf-0.150.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; zeroconf-0.150.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zeroconf-0.150.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl; zeroconf-0.150.0-cp310-cp310-musllinux_1_2_aarch64.whl; zeroconf-0.150.0-cp310-cp310-musllinux_1_2_armv7l.whl; zeroconf-0.150.0-cp310-cp310-musllinux_1_2_riscv64.whl; zeroconf-0.150.0-cp310-cp310-musllinux_1_2_x86_64.whl; zeroconf-0.150.0-cp310-cp310-win32.whl; zeroconf-0.150.0-cp310-cp310-win_amd64.whl; zeroconf-0.150.0-cp311-cp311-macosx_11_0_arm64.whl; zeroconf-0.150.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; zeroconf-0.150.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; zeroconf-0.150.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zeroconf-0.150.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl; zeroconf-0.150.0-cp311-cp311-musllinux_1_2_aarch64.whl; zeroconf-0.150.0-cp311-cp311-musllinux_1_2_armv7l.whl; zeroconf-0.150.0-cp311-cp311-musllinux_1_2_riscv64.whl; zeroconf-0.150.0-cp311-cp311-musllinux_1_2_x86_64.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: MacOS :: MacOS XOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries

Tags

multicast dns service discoverymdns pythonzeroconf bonjourlocal network service discoveryavahi alternative pythonservice browser mdnsnetwork service registration
mdnsservice-discoverynetworking

More Libraries packages