File: README.md

package info (click to toggle)
azure-uamqp-python 1.6.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,564 kB
  • sloc: ansic: 184,383; cpp: 7,738; python: 7,731; cs: 5,767; sh: 983; xml: 298; makefile: 34
file content (141 lines) | stat: -rw-r--r-- 4,572 bytes parent folder | download
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# uAMQP for Python

[![image](https://img.shields.io/pypi/v/uamqp.svg)](https://pypi.python.org/pypi/uamqp/)

[![image](https://img.shields.io/pypi/pyversions/uamqp.svg)](https://pypi.python.org/pypi/uamqp/)

[![image](https://dev.azure.com/azure-sdk/public/_apis/build/status/python/azure-uamqp-python%20-%20client?branchName=main)](https://dev.azure.com/azure-sdk/public/_build?definitionId=89)

An AMQP 1.0 client library for Python.

# Disclaimer

This repo is no longer in active maintenance and we plan on deprecating
it sometime in the first quarter of 2025. The EventHubs & Service Bus
client libraries are now using the python based AMQP library which is
under active development. If there is interest in using the new python
library as standalone, please share your interest in this
[issue](https://github.com/Azure/azure-uamqp-python/issues/374).

uAMQP for Python requires Python 3.6+ starting from v1.5, and Python 2.7
is no longer supported. If Python 2.7 is required, please install uAMQP
v1.4.3:

``` shell
$ pip install uamqp==1.4.3
```

# Installation

Wheels are provided for most major operating systems, so you can install
directly with pip:

``` shell
$ pip install uamqp
```

If you are running a Linux distro that does not support
[ManyLinux1](https://www.python.org/dev/peps/pep-0513) or you need to
customize the build based on your system settings and packages, you can
install from source:

``` shell
$ apt-get update
$ apt-get install -y build-essential libssl-dev uuid-dev cmake libcurl4-openssl-dev pkg-config python3-dev python3-pip
$ pip3 install uamqp --no-binary :all:
```

If you are running Alpine, you can install from source:

``` shell
$ apk add --update python3 py-pip python3-dev cmake gcc g++ openssl-dev build-base
$ pip3 install uamqp --no-binary :all:
```

If you are running Red Hat, you can install from source:

``` shell
$ yum install cmake gcc gcc-c++ make openssl-devel python3-devel
$ pip3 install uamqp --no-binary :all:
```

## Documentation

Reference documentation can be found here:
[docs.microsoft.com/python/api/uamqp/uamqp](https://docs.microsoft.com/python/api/uamqp/uamqp).

# Developer Setup

In order to run the code directly, the Cython extension will need to be
build first.

## Pre-requisites

-   Windows: Setup a [build
    environment](https://packaging.python.org/guides/packaging-binary-extensions/#building-binary-extensions).
-   Linux: Install dependencies as descriped above in the installation
    instructions.
-   MacOS: Install cmake using Homebrew:

``` shell
$ brew install cmake
```

## Building the extension

This project has two C library dependencies. They are vendored in this
repository in these versions:

-   [Azure uAMQP for C](https://github.com/Azure/azure-uamqp-c) @
    [2021-11-16](https://github.com/Azure/azure-uamqp-c/tree/259db533a66a8fa6e9ac61c39a9dae880224145f)
-   [Azure C Shared
    Utility](https://github.com/Azure/azure-c-shared-utility) @
    [2021-11-15](https://github.com/Azure/azure-c-shared-utility/tree/735be16a943c2a9cbbddef0543f871f5bc0e27ab)

To build, start by creating a virtual environment and installing the
required Python packages:

``` shell
$ python -m venv env
$ env/Scripts/activate
(env)$ pip install -r dev_requirements.txt
```

Next, run the build command:

``` shell
$ python setup.py build_ext --inplace
```

## Tests

The tests can be run from within the virtual environment. The extension
must be built first using the instructions above.

``` shell
(env)$ pytest
```

# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-uamqp-python/issues) section
of the project.

# Contributing

This project welcomes contributions and suggestions. Most contributions
require you to agree to a Contributor License Agreement (CLA) declaring
that you have the right to, and actually do, grant us the rights to use
your contribution. For details, visit <https://cla.microsoft.com>.

When you submit a pull request, a CLA-bot will automatically determine
whether you need to provide a CLA and decorate the PR appropriately
(e.g., label, comment). Simply follow the instructions provided by the
bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of
Conduct](https://opensource.microsoft.com/codeofconduct/). For more
information see the [Code of Conduct
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
<opencode@microsoft.com> with any additional questions or comments.