/
__init__.py
124 lines (114 loc) · 3.78 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a framework for the use of DNS Service Discovery
using IP multicast.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
"""
import sys
from ._cache import DNSCache # noqa # import needed for backwards compat
from ._core import Zeroconf
from ._dns import ( # noqa # import needed for backwards compat
DNSAddress,
DNSEntry,
DNSHinfo,
DNSNsec,
DNSPointer,
DNSQuestion,
DNSQuestionType,
DNSRecord,
DNSService,
DNSText,
)
from ._exceptions import (
AbstractMethodException,
BadTypeInNameException,
Error,
EventLoopBlocked,
IncomingDecodeError,
NamePartTooLongException,
NonUniqueNameException,
NotRunningException,
ServiceNameAlreadyRegistered,
)
from ._logger import QuietLogger, log # noqa # import needed for backwards compat
from ._protocol.incoming import DNSIncoming # noqa # import needed for backwards compat
from ._protocol.outgoing import DNSOutgoing # noqa # import needed for backwards compat
from ._services import ( # noqa # import needed for backwards compat
ServiceListener,
ServiceStateChange,
Signal,
SignalRegistrationInterface,
)
from ._services.browser import ServiceBrowser
from ._services.info import ( # noqa # import needed for backwards compat
ServiceInfo,
instance_name_from_service_info,
)
from ._services.registry import ( # noqa # import needed for backwards compat
ServiceRegistry,
)
from ._services.types import ZeroconfServiceTypes
from ._updates import RecordUpdate, RecordUpdateListener
from ._utils.name import service_type_name # noqa # import needed for backwards compat
from ._utils.net import ( # noqa # import needed for backwards compat
InterfaceChoice,
InterfacesType,
IPVersion,
add_multicast_member,
autodetect_ip_version,
create_sockets,
get_all_addresses,
get_all_addresses_v6,
)
from ._utils.time import ( # noqa # import needed for backwards compat
current_time_millis,
millis_to_seconds,
)
__author__ = 'Paul Scott-Murphy, William McBrine'
__maintainer__ = 'Jakub Stasiak <jakub@stasiak.at>'
__version__ = '0.43.0'
__license__ = 'LGPL'
__all__ = [
"__version__",
"Zeroconf",
"ServiceInfo",
"ServiceBrowser",
"ServiceListener",
"DNSQuestionType",
"InterfaceChoice",
"ServiceStateChange",
"IPVersion",
"ZeroconfServiceTypes",
"RecordUpdate",
"RecordUpdateListener",
"current_time_millis",
# Exceptions
"Error",
"AbstractMethodException",
"BadTypeInNameException",
"EventLoopBlocked",
"IncomingDecodeError",
"NamePartTooLongException",
"NonUniqueNameException",
"NotRunningException",
"ServiceNameAlreadyRegistered",
]
if sys.version_info <= (3, 6): # pragma: no cover
raise ImportError( # pragma: no cover
'''
Python version > 3.6 required for python-zeroconf.
If you need support for Python 2 or Python 3.3-3.4 please use version 19.1
If you need support for Python 3.5 please use version 0.28.0
'''
)