File: code_layout.txt

package info (click to toggle)
python-amqplib 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 404 kB
  • sloc: python: 2,296; makefile: 3
file content (55 lines) | stat: -rw-r--r-- 2,616 bytes parent folder | download | duplicates (4)
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
General layout of the Python code for those interested in hacking on it.
------------------------------------------------------------------------

The Connection class in connection.py is the heart of the library, it
wires together the various other classes.

The items in method_framing.py and transport.py should not be visible
to the amqplib user.

This is the general arrangement of how the classes communicate with
each other:

                           +-----------+        +-----------+
channel.py                 |  Channel  |   ...  |  Channel  |
                           +-----------+        +-----------+
                                 ^                    ^
                                 |      methods       |
                                 V                    V
                        +--------------------------------------+
connection.py           |               Connection             |
                        +-------+------------------------------+
                                |                      ^
                                |       methods        |
                                V                      |
                        +----------------+    +--------+-------+
method_framing.py       |  MethodWriter  |    |  MethodReader  |
                        +-------+--------+    +----------------+
                                |                      ^
                                |        frames        |
                                V                      |
                        +------------------------------+-------+
transport.py            |     TCPTransport or SSLTransport     |
                        +-------+------------------------------+
                                |                      ^
                                |        bytes         |
                                V                      |
                            +--------------------------+--+
                            |         TCP Socket          |
                            +-----------------------------+


Other notable bits of code are:

    abstract_channel.py - Contains a common superclass for Connection
                          and Channel classes.

    basic_message.py    - Location of the Message class - which is what
                          is mostly being sent/received over the Channels.

    exceptions.py       - For indicating when things go wrong.

    serialization.py    - Home of AMQPReader and AMQPWriter which are
                          used in many places within the Channel
                          and Connection classes.