Skip to main content

python-zeroconf

https://github.com/python-zeroconf/python-zeroconf/workflows/CI/badge.svg https://img.shields.io/pypi/v/zeroconf.svg https://codecov.io/gh/python-zeroconf/python-zeroconf/branch/master/graph/badge.svg Codspeed.io status for python-zeroconf Documentation Status

Documentation.

This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github.com/paulsm/pyzeroconf), modified by William McBrine (https://github.com/wmcbrine/pyzeroconf).

The original William McBrine’s fork note:

This fork is used in all of my TiVo-related projects: HME for Python
(and therefore HME/VLC), Network Remote, Remote Proxy, and pyTivo.
Before this, I was tracking the changes for zeroconf.py in three
separate repos. I figured I should have an authoritative source.

Although I make changes based on my experience with TiVos, I expect that
they're generally applicable. This version also includes patches found
on the now-defunct (?) Launchpad repo of pyzeroconf, and elsewhere
around the net -- not always well-documented, sorry.

Compatible with:

  • Bonjour

  • Avahi

Compared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf:

  • isn’t tied to Bonjour or Avahi

  • doesn’t use D-Bus

  • doesn’t force you to use particular event loop or Twisted (asyncio is used under the hood but not required)

  • is pip-installable

  • has PyPI distribution

  • has an optional cython extension for performance (pure python is supported as well)

Python compatibility

  • CPython 3.10+

  • PyPy 3.10+

Versioning

This project uses semantic versioning.

Status

This project is actively maintained.

Traffic Reduction

Before version 0.32, most traffic reduction techniques described in https://datatracker.ietf.org/doc/html/rfc6762#section-7 where not implemented which could lead to excessive network traffic. It is highly recommended that version 0.32 or later is used if this is a concern.

IPv6 support

IPv6 support is relatively new and currently limited, specifically:

  • InterfaceChoice.All is an alias for InterfaceChoice.Default on non-POSIX systems.

  • Dual-stack IPv6 sockets are used, which may not be supported everywhere (some BSD variants do not have them).

  • Listening on localhost (::1) does not work. Help with understanding why is appreciated.

How to get python-zeroconf?

The easiest way to install python-zeroconf is using pip:

pip install zeroconf

How do I use it?

Here’s an example of browsing for a service:

from zeroconf import ServiceBrowser, ServiceListener, Zeroconf


class MyListener(ServiceListener):

    def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
        print(f"Service {name} updated")

    def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:
        print(f"Service {name} removed")

    def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
        info = zc.get_service_info(type_, name)
        print(f"Service {name} added, service info: {info}")


zeroconf = Zeroconf()
listener = MyListener()
browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
try:
    input("Press enter to exit...\n\n")
finally:
    zeroconf.close()

If you don’t know the name of the service you need to browse for, try:

from zeroconf import ZeroconfServiceTypes
print('\n'.join(ZeroconfServiceTypes.find()))

See examples directory for more.

Changelog

Changelog

License

GNU Lesser General Public License v2.1 or later (LGPL-2.1-or-later).

The full text of LGPL 2.1 is included in the COPYING file. You may, at your option, use this library under the terms of any later version of the LGPL published by the Free Software Foundation. The canonical SPDX identifier for this project is LGPL-2.1-or-later, as declared in pyproject.toml.

Release files for zeroconf 0.150.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeroconf 0.150.3
File Size Uploaded
zeroconf-0.150.3.tar.gz 216.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zeroconf 0.150.3
File Interpreter ABI Platform
zeroconf-0.150.3-cp314-cp314-manylinux_2_41_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.41+ x86-64 Details

Total release size:2.5 MB

Release files / zeroconf-0.150.3.tar.gz

Download URL zeroconf-0.150.3.tar.gz
Size 216.2 kB
Tags Source
SHA-256 checksum
How to use checksums
54d6b7b958bb71823d379fbf2558630a29a19074e06a072f6ed96bce6baca7f9
BLAKE2b-256 checksum
How to use checksums
f9761702663e4dde1eb8629883149313c76a83452e839980dae04995672f63fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / zeroconf-0.150.3-cp314-cp314-manylinux_2_41_x86_64.whl

Download URL zeroconf-0.150.3-cp314-cp314-manylinux_2_41_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 Linux glibc 2.41+ x86-64
SHA-256 checksum
How to use checksums
2370169894ec085b099b16405294bb1496550760b268e945df69297306c513a7
BLAKE2b-256 checksum
How to use checksums
bbae8b94a523b18e41a0cf0ae75e0a88c183450413e075d2d57b426993f01e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.150.3 This release

2 release files

0.71.2

2 release files

0.71.1

2 release files

0.39.4

2 release files

0.39.3

2 release files

0.39.2

2 release files

0.38.7

2 release files

0.38.4

2 release files

0.38.3

2 release files

0.38.1

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.9

2 release files

0.36.8

2 release files

0.36.7

2 release files

0.36.6

2 release files

0.36.5

2 release files

0.36.4

2 release files

0.36.3

2 release files

0.36.2

2 release files

0.36.1

2 release files

0.36.0

2 release files

0.35.1

2 release files

0.35.0

2 release files

0.33.2

2 release files

0.33.1

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.29.0

2 release files

0.28.7

2 release files

0.28.6

2 release files

0.28.5

2 release files

0.28.3

2 release files

0.28.2

2 release files

0.28.1

2 release files

0.27.0

2 release files

0.26.3

2 release files

0.26.2

2 release files

0.26.0

2 release files

0.25.1

2 release files

0.24.4

2 release files

0.24.3

2 release files

0.24.2

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.22.0

2 release files

0.21.3

2 release files

0.21.2

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.17.5

2 release files

0.17.4

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.15.1

3 release files

0.15

2 release files

0.14

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page