Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test against a RabbitMQ broker

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
services:
rabbitmq-server:
image: rabbitmq:4.0.3-management
ports:
- 5672:5672
- 15672:15672
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Enable RabbitMQ Plugins
run: docker exec ${{ job.services.rabbitmq-server.id }} rabbitmq-plugins enable rabbitmq_stream rabbitmq_stream_management rabbitmq_amqp1_0
- name: poetry install
run: poetry install --no-root
- name: isort check-only
run: poetry run isort --check-only .
- name: black check
run: poetry run black --check .
- name: flake8
run: poetry run flake8 --exclude=venv,local_tests,docs/examples --max-line-length=120 --ignore=E203,W503
- name: mypy
run: |
poetry run mypy .
- name: poetry run pytest
run: poetry run pytest
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.idea/
.vscode/
.vim/

venv/
dist/
__pycache__/
.coverage
.mypy_cache/
.pytest_cache/
.pytype/
*.pyc
.env*

local*
.githooks/
.venv/
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# rabbitmq-amqp-python-client
Python RabbitMQ client for AMQP 1.0 protocol
# RabbitMQ AMQP 1.0 Python Client

This library is in early stages of development. It is meant to be used with RabbitMQ 4.0.

## How to Run

## Getting Started


462 changes: 462 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "rabbitmq-amqp-python-client"
version = "0.1.0"
description = "Python RabbitMQ client for AMQP 1.0 protocol"
authors = ["RabbitMQ team"]
license = "Apache-2.0 license"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
python-qpid-proton = "^0.39.0"

[tool.poetry.dev-dependencies]
flake8 = "^7.1.1"
isort = "^5.9.3"
mypy = "^0.910"
pytest = "^7.4.0"
black = "^23.12.1"
python-qpid-proton = "^0.39.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[isort]
multi_line_output = 3
line_length = 60
include_trailing_comma = True
skip = venv


[flake8]
exclude = .git, venv
max-line-length = 120

[mypy]
python_version = 3.9
strict = True
ignore_missing_imports = True

[mypy-tests.*]
ignore_errors = True
ignore_missing_imports = True
Empty file added tests/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from proton.utils import BlockingConnection


# Temporary this will be replaced by our connection Deal when we start the implementation
# For the moment we just need a test to run poetry run pytest without failing
def test_connection() -> None:
BlockingConnection("amqp://guest:guest@localhost:5672/")