amqp-client-python 0.2.0__tar.gz → 0.2.0.post1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amqp_client_python-0.2.0.post1/.env.example +22 -0
- amqp_client_python-0.2.0.post1/.flake8 +6 -0
- amqp_client_python-0.2.0.post1/.github/workflows/lint.yml +33 -0
- amqp_client_python-0.2.0.post1/.github/workflows/publish.yml +24 -0
- amqp_client_python-0.2.0.post1/.github/workflows/test.yml +64 -0
- amqp_client_python-0.2.0.post1/.github/workflows/type.yml +19 -0
- amqp_client_python-0.2.0.post1/.gitignore +7 -0
- amqp_client_python-0.2.0.post1/.pre-commit-config.yaml +20 -0
- amqp_client_python-0.2.0.post1/.readthedocs.yaml +33 -0
- amqp_client_python-0.2.0.post1/.vscode/settings.json +6 -0
- amqp_client_python-0.2.0.post1/CODE_OF_CONDUCT.md +22 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/PKG-INFO +40 -13
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/README.md +25 -1
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/models/config.py +5 -12
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/models/options.py +1 -5
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/models/ssl_options.py +1 -6
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/async_channel.py +45 -20
- amqp_client_python-0.2.0.post1/amqp_client_python/rabbitmq/async_connection.py +476 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/async_eventbus_rabbitmq.py +67 -43
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/channel_rabbitmq.py +26 -14
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/connection_rabbitmq.py +5 -5
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/eventbus_rabbitmq.py +4 -4
- amqp_client_python-0.2.0.post1/create-self-signed-certs.sh +173 -0
- amqp_client_python-0.2.0.post1/dev_requirements.txt +63 -0
- amqp_client_python-0.2.0.post1/docker-compose.yml +24 -0
- amqp_client_python-0.2.0.post1/docs/API/domain/config.md +1 -0
- amqp_client_python-0.2.0.post1/docs/API/domain/options.md +1 -0
- amqp_client_python-0.2.0.post1/docs/API/domain/ssl_options.md +1 -0
- amqp_client_python-0.2.0.post1/docs/API/rabbitmq/async_eventbus.md +1 -0
- amqp_client_python-0.2.0.post1/docs/contribute.md +40 -0
- amqp_client_python-0.2.0.post1/docs/index.md +26 -0
- amqp_client_python-0.2.0.post1/docs/stylesheets/extra.css +35 -0
- amqp_client_python-0.2.0.post1/docs/templates/cards.html +20 -0
- amqp_client_python-0.2.0.post1/docs/templates/installation.md +9 -0
- amqp_client_python-0.2.0.post1/docs/templates/sponsors.md +5 -0
- amqp_client_python-0.2.0.post1/docs/templates/user_guide.md +8 -0
- amqp_client_python-0.2.0.post1/docs/tutorial.md +72 -0
- amqp_client_python-0.2.0.post1/examples/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/examples/async_case.py +67 -0
- amqp_client_python-0.2.0.post1/examples/default.py +8 -0
- amqp_client_python-0.2.0.post1/examples/multprocess.py +73 -0
- amqp_client_python-0.2.0.post1/examples/publish.py +10 -0
- amqp_client_python-0.2.0.post1/examples/rpc_publish.py +15 -0
- amqp_client_python-0.2.0.post1/examples/rpc_subscribe.py +17 -0
- amqp_client_python-0.2.0.post1/examples/sanic_test.py +36 -0
- amqp_client_python-0.2.0.post1/examples/ssl_connection.py +28 -0
- amqp_client_python-0.2.0.post1/examples/subscribe.py +15 -0
- amqp_client_python-0.2.0.post1/examples/sync_case.py +52 -0
- amqp_client_python-0.2.0.post1/examples/sync_wrapper_case.py +50 -0
- amqp_client_python-0.2.0.post1/examples/thread.py +59 -0
- amqp_client_python-0.2.0.post1/external_config/rabbitmq/rabbitmq.conf +1003 -0
- amqp_client_python-0.2.0.post1/mkdocs.yml +34 -0
- amqp_client_python-0.2.0.post1/mypy.ini +2 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/pyproject.toml +42 -38
- amqp_client_python-0.2.0.post1/tests/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/conftest.py +31 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/rpc_provider_test.py +54 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/signals_test.py +62 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/ssl_test.py +23 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus/subscribe_test.py +26 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/conftest.py +32 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/rpc_provider_test.py +21 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/signals_test.py +65 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/ssl_test.py +23 -0
- amqp_client_python-0.2.0.post1/tests/integration/async_eventbus_wrapper/subscribe_test.py +22 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/conftest.py +12 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/publish_test.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/rpc_publish_test.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/rpc_subscribe_test.py +0 -0
- amqp_client_python-0.2.0.post1/tests/integration/eventbus/subscribe_test.py +0 -0
- amqp_client_python-0.2.0.post1/tests/unit/__init__.py +0 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_async_channel.py +122 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_async_rpc_client.py +134 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_channel_factory.py +21 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_publish.py +73 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_rpc_subscribe.py +76 -0
- amqp_client_python-0.2.0.post1/tests/unit/channels/test_subscribe.py +30 -0
- amqp_client_python-0.2.0.post1/tests/unit/config/test_uri.py +37 -0
- amqp_client_python-0.2.0.post1/tests/unit/conftest.py +39 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/default.py +2 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/test_async_eventbus.py +31 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/test_async_eventbus_provide_resource.py +57 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/test_async_eventbus_publish.py +78 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/test_async_eventbus_rpc_client.py +62 -0
- amqp_client_python-0.2.0.post1/tests/unit/eventbus/test_async_eventbus_subscribe.py +38 -0
- amqp_client_python-0.2.0.post1/tests/unit/utils/ca.pem +20 -0
- amqp_client_python-0.2.0.post1/tests/unit/utils/rabbitmq_cert.pem +19 -0
- amqp_client_python-0.2.0.post1/tests/unit/utils/rabbitmq_key.pem +27 -0
- amqp_client_python-0.2.0.post1/uv.lock +1624 -0
- amqp_client_python-0.2.0/amqp_client_python/rabbitmq/async_connection.py +0 -260
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/LICENSE +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/models/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/utils/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/utils/connection_type.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/domain/utils/types.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/async_provider_handler.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/async_subscriber_handler.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/event.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/integration_event.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/integration_event_handler.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/provider_handler.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/event/subscriber_handler.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/auto_reconnect_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/blocking_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/eventbus_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/nack_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/publish_timeout_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/response_timeout_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/rpc_provider_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/thread_unsafe_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/exceptions/timeout_exception.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/py.typed +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/__init__.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/async_channel_factory.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/async_connection_factory.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/channel_factory_rabbitmq.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/connection_factory_rabbitmq.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/eventbus_wrapper_rabbitmq.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/rabbitmq/ioloop_factory.py +0 -0
- {amqp_client_python-0.2.0 → amqp_client_python-0.2.0.post1}/amqp_client_python/signals.py +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
RABBITMQ_SSL=FALSE
|
|
2
|
+
|
|
3
|
+
# RABBITMQ_CERT_PATH: RabbitMQ Certificate
|
|
4
|
+
# default value: .certs/analytics/cert.pem
|
|
5
|
+
#
|
|
6
|
+
# To generate self-signed certificates,
|
|
7
|
+
# use the ./create-self-signed-certs.sh script.
|
|
8
|
+
RABBITMQ_CERT_PATH=.certs/analytics/rabbitmq_cert.pem
|
|
9
|
+
|
|
10
|
+
# RABBITMQ_KEY_PATH: RabbitMQ Key
|
|
11
|
+
# default value: .certs/analytics/key.pem
|
|
12
|
+
#
|
|
13
|
+
# To generate self-signed certificates,
|
|
14
|
+
# use the ./create-self-signed-certs.sh script.
|
|
15
|
+
RABBITMQ_KEY_PATH=.certs/analytics/rabbitmq_key.pem
|
|
16
|
+
|
|
17
|
+
# RABBITMQ_CA_PATH: RabbitMQ Certificate of the Authentication entity (CA)
|
|
18
|
+
# default value: .certs/analytics/ca.pem
|
|
19
|
+
#
|
|
20
|
+
# To generate self-signed certificates,
|
|
21
|
+
# use the ./create-self-signed-certs.sh script.
|
|
22
|
+
RABBITMQ_CA_PATH=.certs/analytics/ca.pem
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Lint
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "master", "develop" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master", "develop" ]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
- name: Set up Python 3.8
|
|
23
|
+
uses: actions/setup-python@v3
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.8"
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install flake8
|
|
30
|
+
- name: Lint with flake8
|
|
31
|
+
run: |
|
|
32
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
33
|
+
flake8 amqp_client_python/ --ignore=E722,W503,E402 --count --max-line-length=127 --statistics
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
uses: actions/setup-python@v4
|
|
14
|
+
with:
|
|
15
|
+
python-version: '3.x'
|
|
16
|
+
- name: Install Poetry
|
|
17
|
+
uses: snok/install-poetry@v1
|
|
18
|
+
- name: Build and publish
|
|
19
|
+
env:
|
|
20
|
+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
21
|
+
run: |
|
|
22
|
+
poetry config pypi-token.pypi $PYPI_TOKEN
|
|
23
|
+
poetry build
|
|
24
|
+
poetry publish
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Tests
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "master", "develop" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master", "develop" ]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v3
|
|
22
|
+
- name: Generate self-signed certificates
|
|
23
|
+
run: |
|
|
24
|
+
# Make the script executable and run it
|
|
25
|
+
chmod +x ./create-self-signed-certs.sh
|
|
26
|
+
./create-self-signed-certs.sh
|
|
27
|
+
|
|
28
|
+
- name: Start RabbitMQ container manually
|
|
29
|
+
run: |
|
|
30
|
+
# We start the container manually as a step to ensure that the certificate
|
|
31
|
+
# and config files exist on the host before we try to mount them.
|
|
32
|
+
docker run -d --name rabbitmq \
|
|
33
|
+
-p 5672:5672 \
|
|
34
|
+
-p 5671:5671 \
|
|
35
|
+
-v ${{ github.workspace }}/.certs/rabbitmq:/etc/ssl:ro \
|
|
36
|
+
-v ${{ github.workspace }}/external_config/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro \
|
|
37
|
+
-e RABBITMQ_DEFAULT_USER=guest \
|
|
38
|
+
-e RABBITMQ_DEFAULT_PASS=guest \
|
|
39
|
+
rabbitmq:3-management-alpine
|
|
40
|
+
- name: Wait for RabbitMQ to start
|
|
41
|
+
run: |
|
|
42
|
+
echo "Waiting for RabbitMQ to initialize..."
|
|
43
|
+
# Give the container time to start up and apply the configuration.
|
|
44
|
+
sleep 8
|
|
45
|
+
- name: Set up Python 3.8
|
|
46
|
+
uses: actions/setup-python@v3
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.8"
|
|
49
|
+
- name: Install dependencies
|
|
50
|
+
run: |
|
|
51
|
+
python -m pip install --upgrade pip
|
|
52
|
+
pip install pytest pika coverage
|
|
53
|
+
if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; fi
|
|
54
|
+
- name: Run unit tests with coverage
|
|
55
|
+
run: |
|
|
56
|
+
coverage run --source=amqp_client_python -m pytest -v tests/unit/
|
|
57
|
+
- name: Run integration tests with coverage
|
|
58
|
+
run: |
|
|
59
|
+
coverage run --append --source=amqp_client_python -m pytest -v tests/integration/
|
|
60
|
+
env:
|
|
61
|
+
AMQP_DOMAIN: localhost
|
|
62
|
+
- name: Generate and show combined coverage report
|
|
63
|
+
run: |
|
|
64
|
+
coverage report --show-missing
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Python Type Checking
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
mypy:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v2
|
|
10
|
+
- name: Set up Python
|
|
11
|
+
uses: actions/setup-python@v2
|
|
12
|
+
with:
|
|
13
|
+
python-version: '3.x'
|
|
14
|
+
- name: Install dependencies
|
|
15
|
+
run: |
|
|
16
|
+
python -m pip install --upgrade pip
|
|
17
|
+
pip install mypy
|
|
18
|
+
- name: Run mypy
|
|
19
|
+
run: mypy amqp_client_python/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/ambv/black
|
|
3
|
+
rev: 23.1.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: black
|
|
6
|
+
language_version: python3.8
|
|
7
|
+
stages: [commit]
|
|
8
|
+
- repo: https://github.com/PyCQA/flake8
|
|
9
|
+
rev: 6.0.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: flake8
|
|
12
|
+
stages: [commit]
|
|
13
|
+
- repo: local
|
|
14
|
+
hooks:
|
|
15
|
+
- id: requirements
|
|
16
|
+
name: requirements
|
|
17
|
+
entry: bash -c 'dev_env/bin/pip3 freeze > dev_requirements.txt; git add dev_requirements.txt'
|
|
18
|
+
language: system
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
stages: [commit]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
# Set the OS, Python version and other tools you might need
|
|
4
|
+
build:
|
|
5
|
+
os: ubuntu-22.04
|
|
6
|
+
tools:
|
|
7
|
+
python: "3.8"
|
|
8
|
+
jobs:
|
|
9
|
+
post_create_environment:
|
|
10
|
+
- pip install poetry
|
|
11
|
+
- poetry config virtualenvs.create false
|
|
12
|
+
post_install:
|
|
13
|
+
- pip install --only doc
|
|
14
|
+
# You can also specify other tool versions:
|
|
15
|
+
# nodejs: "19"
|
|
16
|
+
# rust: "1.64"
|
|
17
|
+
# golang: "1.19"
|
|
18
|
+
|
|
19
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
20
|
+
mkdocs:
|
|
21
|
+
configuration: mkdocs.yml
|
|
22
|
+
|
|
23
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
24
|
+
# formats:
|
|
25
|
+
# - pdf
|
|
26
|
+
# - epub
|
|
27
|
+
|
|
28
|
+
# Optional but recommended, declare the Python requirements required
|
|
29
|
+
# to build your documentation
|
|
30
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
31
|
+
# python:
|
|
32
|
+
# install:
|
|
33
|
+
# - requirements: docs/requirements.txt
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
|
4
|
+
|
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender identity, sexual orientation, disability, personal appearance, race, ethnicity, age, religion, or nationality.
|
|
6
|
+
|
|
7
|
+
Examples of unacceptable behavior include:
|
|
8
|
+
|
|
9
|
+
* The use of sexualized language or imagery
|
|
10
|
+
* Personal attacks
|
|
11
|
+
* Trolling or insulting/derogatory comments
|
|
12
|
+
* Public or private harassment
|
|
13
|
+
* Publishing others' private information, such as physical or electronic addresses, without explicit permission
|
|
14
|
+
* Other unethical or unprofessional conduct
|
|
15
|
+
|
|
16
|
+
## Enforcement
|
|
17
|
+
|
|
18
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at our [discord channel](https://discord.gg/RkXNeZpNZk). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
19
|
+
|
|
20
|
+
## Attribution
|
|
21
|
+
|
|
22
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: amqp-client-python
|
|
3
|
-
Version: 0.2.0
|
|
3
|
+
Version: 0.2.0.post1
|
|
4
4
|
Summary: Python AMQP Client Library
|
|
5
|
-
|
|
5
|
+
Project-URL: Homepage, https://github.com/nutes-uepb/amqp-client-python
|
|
6
|
+
Project-URL: Repository, https://github.com/nutes-uepb/amqp-client-python
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/nutes-uepb/amqp-client-python/issues
|
|
8
|
+
Project-URL: Source, https://github.com/nutes-uepb/amqp-client-python
|
|
9
|
+
Author-email: NUTES UEPB <dev.seniorsaudemovel@gmail.com>
|
|
10
|
+
Maintainer-email: "João Pedro Miranda C. Hluchan" <berrytern@gmail.com>
|
|
6
11
|
License: Apache-2.0
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Author-email: dev.seniorsaudemovel@gmail.com
|
|
10
|
-
Requires-Python: >=3.7,<4.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: amqp-client-python,dependency,packaging
|
|
11
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
15
|
Classifier: Intended Audience :: Developers
|
|
13
16
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
17
|
Classifier: Natural Language :: English
|
|
15
18
|
Classifier: Operating System :: OS Independent
|
|
16
19
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
18
20
|
Classifier: Programming Language :: Python :: 3.8
|
|
19
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
27
|
Classifier: Topic :: Communications
|
|
24
28
|
Classifier: Topic :: Internet
|
|
25
29
|
Classifier: Topic :: Software Development :: Libraries
|
|
26
30
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
31
|
Classifier: Topic :: System :: Networking
|
|
28
|
-
Requires-
|
|
29
|
-
|
|
30
|
-
Project-URL: Repository, https://github.com/nutes-uepb/amqp-client-python
|
|
32
|
+
Requires-Python: <4.0,>=3.9
|
|
33
|
+
Requires-Dist: pika<2.0.0,>=1.3.0
|
|
31
34
|
Description-Content-Type: text/markdown
|
|
32
35
|
|
|
33
36
|
# AMQP Client Python
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
A Python client providing a high-level abstraction for interacting with RabbitMQ, simplifying message publishing, subscribing, and RPC patterns.
|
|
36
39
|
|
|
37
40
|
--------
|
|
38
41
|
|
|
@@ -53,6 +56,18 @@ Client with high level of abstraction for manipulation of messages in the event
|
|
|
53
56
|
|
|
54
57
|
**Source Code**: <a href="https://github.com/nutes-uepb/amqp-client-python" target="_blank">https://github.com/nutes-uepb/amqp-client-python</a>
|
|
55
58
|
|
|
59
|
+
**Discord Server**: <a href="https://discord.gg/RkXNeZpNZk" target="_blank">https://discord.gg/RkXNeZpNZk</a>
|
|
60
|
+
|
|
61
|
+
### 🦀 Looking for higher performance? Try `amqp-rs`!
|
|
62
|
+
If you need higher throughput, thread safety, and built-in compression, check out [**amqp-rs**](https://pypi.org/project/amqp-rs/).
|
|
63
|
+
|
|
64
|
+
It is a high-performance Python extension developed in Rust using PyO3 and `tokio`. It shares a similar API and design philosophy with this library, but adds native thread safety, `zstd`/`zlib`/`lz4` compression, robust TLS/SSL support, and graceful shutdowns.
|
|
65
|
+
|
|
66
|
+
You can install it via `pip` or `uv`:
|
|
67
|
+
```bash
|
|
68
|
+
pip install amqp-rs
|
|
69
|
+
```
|
|
70
|
+
|
|
56
71
|
---
|
|
57
72
|
### Features:
|
|
58
73
|
- Automatic creation and management of queues, exchanges and channels;
|
|
@@ -69,6 +84,18 @@ Client with high level of abstraction for manipulation of messages in the event
|
|
|
69
84
|
| 0.2.0 | 0.2.0 |
|
|
70
85
|
| 0.1.14 | ~0.1.12 |
|
|
71
86
|
|
|
87
|
+
### Installation
|
|
88
|
+
|
|
89
|
+
You can install `amqp-client-python` using pip:
|
|
90
|
+
```bash
|
|
91
|
+
pip install amqp-client-python
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Prerequisites
|
|
95
|
+
|
|
96
|
+
* Python 3.7+
|
|
97
|
+
* A running RabbitMQ instance.
|
|
98
|
+
|
|
72
99
|
### Examples:
|
|
73
100
|
#### you can use [sync](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/eventbus_rabbitmq.py) , [async eventbus](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/async_eventbus_rabbitmq.py) and [sync wrapper](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/eventbus_wrapper_rabbitmq.py) of async eventbus
|
|
74
101
|
<details><summary>async usage </summary>
|
|
@@ -229,4 +256,4 @@ When using [**EventbusRabbitMQ**](https://github.com/nutes-uepb/amqp-client-pyth
|
|
|
229
256
|
[known-vulnerabilities-image]: https://snyk.io/test/github/nutes-uepb/amqp-client-python/badge.svg?targetFile=requirements.txt
|
|
230
257
|
[known-vulnerabilities-url]: https://snyk.io/test/github/nutes-uepb/amqp-client-python?targetFile=requirements.txt
|
|
231
258
|
[releases-image]: https://img.shields.io/github/release-date/nutes-uepb/amqp-client-python.svg
|
|
232
|
-
[releases-url]: https://github.com/nutes-uepb/amqp-client-python/releases
|
|
259
|
+
[releases-url]: https://github.com/nutes-uepb/amqp-client-python/releases
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AMQP Client Python
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Python client providing a high-level abstraction for interacting with RabbitMQ, simplifying message publishing, subscribing, and RPC patterns.
|
|
4
4
|
|
|
5
5
|
--------
|
|
6
6
|
|
|
@@ -21,6 +21,18 @@ Client with high level of abstraction for manipulation of messages in the event
|
|
|
21
21
|
|
|
22
22
|
**Source Code**: <a href="https://github.com/nutes-uepb/amqp-client-python" target="_blank">https://github.com/nutes-uepb/amqp-client-python</a>
|
|
23
23
|
|
|
24
|
+
**Discord Server**: <a href="https://discord.gg/RkXNeZpNZk" target="_blank">https://discord.gg/RkXNeZpNZk</a>
|
|
25
|
+
|
|
26
|
+
### 🦀 Looking for higher performance? Try `amqp-rs`!
|
|
27
|
+
If you need higher throughput, thread safety, and built-in compression, check out [**amqp-rs**](https://pypi.org/project/amqp-rs/).
|
|
28
|
+
|
|
29
|
+
It is a high-performance Python extension developed in Rust using PyO3 and `tokio`. It shares a similar API and design philosophy with this library, but adds native thread safety, `zstd`/`zlib`/`lz4` compression, robust TLS/SSL support, and graceful shutdowns.
|
|
30
|
+
|
|
31
|
+
You can install it via `pip` or `uv`:
|
|
32
|
+
```bash
|
|
33
|
+
pip install amqp-rs
|
|
34
|
+
```
|
|
35
|
+
|
|
24
36
|
---
|
|
25
37
|
### Features:
|
|
26
38
|
- Automatic creation and management of queues, exchanges and channels;
|
|
@@ -37,6 +49,18 @@ Client with high level of abstraction for manipulation of messages in the event
|
|
|
37
49
|
| 0.2.0 | 0.2.0 |
|
|
38
50
|
| 0.1.14 | ~0.1.12 |
|
|
39
51
|
|
|
52
|
+
### Installation
|
|
53
|
+
|
|
54
|
+
You can install `amqp-client-python` using pip:
|
|
55
|
+
```bash
|
|
56
|
+
pip install amqp-client-python
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Prerequisites
|
|
60
|
+
|
|
61
|
+
* Python 3.7+
|
|
62
|
+
* A running RabbitMQ instance.
|
|
63
|
+
|
|
40
64
|
### Examples:
|
|
41
65
|
#### you can use [sync](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/eventbus_rabbitmq.py) , [async eventbus](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/async_eventbus_rabbitmq.py) and [sync wrapper](https://github.com/nutes-uepb/amqp-client-python/blob/develop/amqp_client_python/rabbitmq/eventbus_wrapper_rabbitmq.py) of async eventbus
|
|
42
66
|
<details><summary>async usage </summary>
|
|
@@ -10,15 +10,11 @@ class Config:
|
|
|
10
10
|
self, options: Options, ssl_options: Optional[SSLOptions] = None
|
|
11
11
|
) -> None:
|
|
12
12
|
"""
|
|
13
|
-
Create
|
|
13
|
+
Create a Config object that holds and manages the connection information.
|
|
14
14
|
|
|
15
15
|
Args:
|
|
16
|
-
options:
|
|
17
|
-
ssl_options:
|
|
18
|
-
|
|
19
|
-
Returns:
|
|
20
|
-
|
|
21
|
-
Raises:
|
|
16
|
+
options: holds information for establishing connection
|
|
17
|
+
ssl_options: holds information for establishing SSL connections
|
|
22
18
|
|
|
23
19
|
Examples:
|
|
24
20
|
>>> Config(
|
|
@@ -32,16 +28,13 @@ class Config:
|
|
|
32
28
|
|
|
33
29
|
def build(self) -> "Config":
|
|
34
30
|
"""
|
|
35
|
-
Create
|
|
36
|
-
|
|
37
|
-
Args:
|
|
31
|
+
Create a Config object that holds and manages the connection information.
|
|
38
32
|
|
|
39
33
|
Returns:
|
|
40
34
|
Config object
|
|
41
35
|
|
|
42
|
-
Raises:
|
|
43
|
-
|
|
44
36
|
Examples:
|
|
37
|
+
>>> # config = Config(...)
|
|
45
38
|
>>> config.build()
|
|
46
39
|
"""
|
|
47
40
|
opt = {
|
|
@@ -18,7 +18,7 @@ class Options:
|
|
|
18
18
|
**kwargs: Dict[str, Any]
|
|
19
19
|
) -> None:
|
|
20
20
|
"""
|
|
21
|
-
Create an Options object that
|
|
21
|
+
Create an Options object that holds the credentials and configuration options.
|
|
22
22
|
|
|
23
23
|
Args:
|
|
24
24
|
queue_name: name of queue that will be used for subscriptions
|
|
@@ -34,10 +34,6 @@ class Options:
|
|
|
34
34
|
publisher_confirms: wait for publisher confirmations
|
|
35
35
|
**kwargs: pika options
|
|
36
36
|
|
|
37
|
-
Returns:
|
|
38
|
-
|
|
39
|
-
Raises:
|
|
40
|
-
|
|
41
37
|
Examples:
|
|
42
38
|
>>> Options("example", "example.rpc", "example.rpc", "amqp://admin:admin@localhost:5672/")
|
|
43
39
|
|
|
@@ -3,18 +3,13 @@ class SSLOptions:
|
|
|
3
3
|
self, certfile_path: str, keyfile_path: str, ca_certs_path: str
|
|
4
4
|
) -> None:
|
|
5
5
|
"""
|
|
6
|
-
Create an SslOptions object that
|
|
6
|
+
Create an SslOptions object that holds the cert paths.
|
|
7
7
|
|
|
8
8
|
Args:
|
|
9
9
|
certfile_path: cert file path string
|
|
10
10
|
keyfile_path: private key file path string
|
|
11
11
|
ca_certs_path: ca file path string
|
|
12
12
|
|
|
13
|
-
Returns:
|
|
14
|
-
Um dicionário com as notas da escala e os graus.
|
|
15
|
-
|
|
16
|
-
Raises:
|
|
17
|
-
|
|
18
13
|
Examples:
|
|
19
14
|
>>> SSLOptions("./.certs/cert.pem", "./.certs/privkey.pem", "./.certs/ca.pem")
|
|
20
15
|
"""
|