1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 """
21 The proton module defines a suite of APIs that implement the AMQP 1.0
22 protocol.
23
24 The proton APIs consist of the following classes:
25
26 - L{Message} -- A class for creating and/or accessing AMQP message content.
27 - L{Data} -- A class for creating and/or accessing arbitrary AMQP encoded
28 data.
29
30 """
31 from __future__ import absolute_import
32
33 import logging
34
35 from cproton import PN_VERSION_MAJOR, PN_VERSION_MINOR, PN_VERSION_POINT
36
37 from ._condition import Condition
38 from ._data import UNDESCRIBED, Array, Data, Described, char, symbol, timestamp, ubyte, ushort, uint, ulong, \
39 byte, short, int32, float32, decimal32, decimal64, decimal128
40 from ._delivery import Delivery, Disposition
41 from ._endpoints import Endpoint, Connection, Session, Link, Receiver, Sender, Terminus
42 from ._events import Collector, Event, EventType, Handler
43 from ._exceptions import ProtonException, MessageException, DataException, TransportException, \
44 SSLException, SSLUnavailable, ConnectionException, SessionException, LinkException, Timeout, Interrupt
45 from ._message import Message, ABORTED, ACCEPTED, PENDING, REJECTED, RELEASED, MODIFIED, SETTLED
46 from ._transport import Transport, SASL, SSL, SSLDomain, SSLSessionDetails
47 from ._url import Url
48
49 __all__ = [
50 "API_LANGUAGE",
51 "IMPLEMENTATION_LANGUAGE",
52 "ABORTED",
53 "ACCEPTED",
54 "PENDING",
55 "REJECTED",
56 "RELEASED",
57 "MODIFIED",
58 "SETTLED",
59 "UNDESCRIBED",
60 "Array",
61 "Collector",
62 "Condition",
63 "Connection",
64 "Data",
65 "DataException",
66 "Delivery",
67 "Disposition",
68 "Described",
69 "Endpoint",
70 "Event",
71 "EventType",
72 "Handler",
73 "Link",
74 "LinkException",
75 "Message",
76 "MessageException",
77 "ProtonException",
78 "VERSION_MAJOR",
79 "VERSION_MINOR",
80 "Receiver",
81 "SASL",
82 "Sender",
83 "Session",
84 "SessionException",
85 "SSL",
86 "SSLDomain",
87 "SSLSessionDetails",
88 "SSLUnavailable",
89 "SSLException",
90 "Terminus",
91 "Timeout",
92 "Interrupt",
93 "Transport",
94 "TransportException",
95 "Url",
96 "char",
97 "symbol",
98 "timestamp",
99 "ulong",
100 "byte",
101 "short",
102 "int32",
103 "ubyte",
104 "ushort",
105 "uint",
106 "float32",
107 "decimal32",
108 "decimal64",
109 "decimal128"
110 ]
111
112 VERSION_MAJOR = PN_VERSION_MAJOR
113 VERSION_MINOR = PN_VERSION_MINOR
114 VERSION_POINT = PN_VERSION_POINT
115 VERSION = (VERSION_MAJOR, VERSION_MINOR, VERSION_POINT)
116 API_LANGUAGE = "C"
117 IMPLEMENTATION_LANGUAGE = "C"
118
119
120
121
122
126
127 - def emit(self, record):
129
132
133
134 handler = NullHandler()
135
136 log = logging.getLogger("proton")
137 log.addHandler(handler)
138
139
141 import uuid
142 return uuid.uuid4()
143