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