python-zeroconf
===============
.. image:: https://github.com/python-zeroconf/python-zeroconf/workflows/CI/badge.svg
:target: https://github.com/python-zeroconf/python-zeroconf?query=workflow%3ACI+branch%3Amaster
.. image:: https://img.shields.io/pypi/v/zeroconf.svg
:target: https://pypi.python.org/pypi/zeroconf
.. image:: https://codecov.io/gh/python-zeroconf/python-zeroconf/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-zeroconf/python-zeroconf
`Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.
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.8+
* PyPy3.8 7.3+
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?
===========================
* PyPI page https://pypi.org/project/zeroconf/
* GitHub project https://github.com/python-zeroconf/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:
.. code-block:: python
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()
.. note::
Discovery and service registration use *all* available network interfaces by default.
If you want to customize that you need to specify ``interfaces`` argument when
constructing ``Zeroconf`` object (see the code for details).
If you don't know the name of the service you need to browse for, try:
.. code-block:: python
from zeroconf import ZeroconfServiceTypes
print('\n'.join(ZeroconfServiceTypes.find()))
See examples directory for more.
Changelog
=========
`Changelog <CHANGELOG.md>`_
License
=======
LGPL, see COPYING file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/python-zeroconf/python-zeroconf",
"name": "zeroconf",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Paul Scott-Murphy",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/24/7d/02e8c583b57692eee495e60c7a4dd862635a9702067d69c6dd1c907cb589/zeroconf-0.132.2.tar.gz",
"platform": null,
"description": "python-zeroconf\n===============\n\n.. image:: https://github.com/python-zeroconf/python-zeroconf/workflows/CI/badge.svg\n :target: https://github.com/python-zeroconf/python-zeroconf?query=workflow%3ACI+branch%3Amaster\n\n.. image:: https://img.shields.io/pypi/v/zeroconf.svg\n :target: https://pypi.python.org/pypi/zeroconf\n\n.. image:: https://codecov.io/gh/python-zeroconf/python-zeroconf/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/python-zeroconf/python-zeroconf\n\n`Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.\n\nThis is fork of pyzeroconf, Multicast DNS Service Discovery for Python,\noriginally by Paul Scott-Murphy (https://github.com/paulsm/pyzeroconf),\nmodified by William McBrine (https://github.com/wmcbrine/pyzeroconf).\n\nThe original William McBrine's fork note::\n\n This fork is used in all of my TiVo-related projects: HME for Python\n (and therefore HME/VLC), Network Remote, Remote Proxy, and pyTivo.\n Before this, I was tracking the changes for zeroconf.py in three\n separate repos. I figured I should have an authoritative source.\n\n Although I make changes based on my experience with TiVos, I expect that\n they're generally applicable. This version also includes patches found\n on the now-defunct (?) Launchpad repo of pyzeroconf, and elsewhere\n around the net -- not always well-documented, sorry.\n\nCompatible with:\n\n* Bonjour\n* Avahi\n\nCompared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf:\n\n* isn't tied to Bonjour or Avahi\n* doesn't use D-Bus\n* doesn't force you to use particular event loop or Twisted (asyncio is used under the hood but not required)\n* is pip-installable\n* has PyPI distribution\n* has an optional cython extension for performance (pure python is supported as well)\n\nPython compatibility\n--------------------\n\n* CPython 3.8+\n* PyPy3.8 7.3+\n\nVersioning\n----------\n\nThis project uses semantic versioning.\n\nStatus\n------\n\nThis project is actively maintained.\n\nTraffic Reduction\n-----------------\n\nBefore version 0.32, most traffic reduction techniques described in https://datatracker.ietf.org/doc/html/rfc6762#section-7\nwhere not implemented which could lead to excessive network traffic. It is highly recommended that version 0.32 or later\nis used if this is a concern.\n\nIPv6 support\n------------\n\nIPv6 support is relatively new and currently limited, specifically:\n\n* `InterfaceChoice.All` is an alias for `InterfaceChoice.Default` on non-POSIX\n systems.\n* Dual-stack IPv6 sockets are used, which may not be supported everywhere (some\n BSD variants do not have them).\n* Listening on localhost (`::1`) does not work. Help with understanding why is\n appreciated.\n\nHow to get python-zeroconf?\n===========================\n\n* PyPI page https://pypi.org/project/zeroconf/\n* GitHub project https://github.com/python-zeroconf/python-zeroconf\n\nThe easiest way to install python-zeroconf is using pip::\n\n pip install zeroconf\n\n\n\nHow do I use it?\n================\n\nHere's an example of browsing for a service:\n\n.. code-block:: python\n\n from zeroconf import ServiceBrowser, ServiceListener, Zeroconf\n\n\n class MyListener(ServiceListener):\n\n def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n print(f\"Service {name} updated\")\n\n def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n print(f\"Service {name} removed\")\n\n def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n info = zc.get_service_info(type_, name)\n print(f\"Service {name} added, service info: {info}\")\n\n\n zeroconf = Zeroconf()\n listener = MyListener()\n browser = ServiceBrowser(zeroconf, \"_http._tcp.local.\", listener)\n try:\n input(\"Press enter to exit...\\n\\n\")\n finally:\n zeroconf.close()\n\n.. note::\n\n Discovery and service registration use *all* available network interfaces by default.\n If you want to customize that you need to specify ``interfaces`` argument when\n constructing ``Zeroconf`` object (see the code for details).\n\nIf you don't know the name of the service you need to browse for, try:\n\n.. code-block:: python\n\n from zeroconf import ZeroconfServiceTypes\n print('\\n'.join(ZeroconfServiceTypes.find()))\n\nSee examples directory for more.\n\nChangelog\n=========\n\n`Changelog <CHANGELOG.md>`_\n\nLicense\n=======\n\nLGPL, see COPYING file for details.\n\n",
"bugtrack_url": null,
"license": "LGPL",
"summary": "A pure python implementation of multicast DNS service discovery",
"version": "0.132.2",
"project_urls": {
"Bug Tracker": "https://github.com/python-zeroconf/python-zeroconf/issues",
"Changelog": "https://github.com/python-zeroconf/python-zeroconf/blob/master/CHANGELOG.md",
"Documentation": "https://python-zeroconf.readthedocs.io",
"Homepage": "https://github.com/python-zeroconf/python-zeroconf",
"Repository": "https://github.com/python-zeroconf/python-zeroconf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f2b508d2fd0fcafa33c512a327dd47aa223e3aec2951e37fcad5a9360b019e5",
"md5": "74f2a32c4c7b85dec3b3ecc69233d03d",
"sha256": "ddae9592604fe04ec065cc53a321844c3592c812988346136d8ee548127f3d12"
},
"downloads": -1,
"filename": "zeroconf-0.132.2-cp310-cp310-manylinux_2_31_x86_64.whl",
"has_sig": false,
"md5_digest": "74f2a32c4c7b85dec3b3ecc69233d03d",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": "<4.0,>=3.8",
"size": 10395355,
"upload_time": "2024-04-13T00:44:09",
"upload_time_iso_8601": "2024-04-13T00:44:09.734211Z",
"url": "https://files.pythonhosted.org/packages/6f/2b/508d2fd0fcafa33c512a327dd47aa223e3aec2951e37fcad5a9360b019e5/zeroconf-0.132.2-cp310-cp310-manylinux_2_31_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "247d02e8c583b57692eee495e60c7a4dd862635a9702067d69c6dd1c907cb589",
"md5": "25fbce5f213df0043dfb89f8a938d03a",
"sha256": "9ad8bc6e3f168fe8c164634c762d3265c775643defff10e26273623a12d73ae1"
},
"downloads": -1,
"filename": "zeroconf-0.132.2.tar.gz",
"has_sig": false,
"md5_digest": "25fbce5f213df0043dfb89f8a938d03a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 170698,
"upload_time": "2024-04-13T00:44:14",
"upload_time_iso_8601": "2024-04-13T00:44:14.567460Z",
"url": "https://files.pythonhosted.org/packages/24/7d/02e8c583b57692eee495e60c7a4dd862635a9702067d69c6dd1c907cb589/zeroconf-0.132.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-13 00:44:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "python-zeroconf",
"github_project": "python-zeroconf",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "zeroconf"
}