jqueue 0.1.0__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.
Files changed (39) hide show
  1. jqueue-0.1.0/.github/workflows/ci.yml +54 -0
  2. jqueue-0.1.0/.github/workflows/release.yml +76 -0
  3. jqueue-0.1.0/.gitignore +41 -0
  4. jqueue-0.1.0/LICENSE +21 -0
  5. jqueue-0.1.0/PKG-INFO +712 -0
  6. jqueue-0.1.0/README.md +677 -0
  7. jqueue-0.1.0/jqueue/__init__.py +95 -0
  8. jqueue-0.1.0/jqueue/adapters/__init__.py +0 -0
  9. jqueue-0.1.0/jqueue/adapters/storage/__init__.py +0 -0
  10. jqueue-0.1.0/jqueue/adapters/storage/filesystem.py +108 -0
  11. jqueue-0.1.0/jqueue/adapters/storage/gcs.py +130 -0
  12. jqueue-0.1.0/jqueue/adapters/storage/memory.py +62 -0
  13. jqueue-0.1.0/jqueue/adapters/storage/s3.py +135 -0
  14. jqueue-0.1.0/jqueue/core/__init__.py +0 -0
  15. jqueue-0.1.0/jqueue/core/broker.py +109 -0
  16. jqueue-0.1.0/jqueue/core/codec.py +42 -0
  17. jqueue-0.1.0/jqueue/core/direct.py +170 -0
  18. jqueue-0.1.0/jqueue/core/group_commit.py +263 -0
  19. jqueue-0.1.0/jqueue/core/heartbeat.py +90 -0
  20. jqueue-0.1.0/jqueue/domain/__init__.py +0 -0
  21. jqueue-0.1.0/jqueue/domain/errors.py +46 -0
  22. jqueue-0.1.0/jqueue/domain/models.py +177 -0
  23. jqueue-0.1.0/jqueue/ports/__init__.py +0 -0
  24. jqueue-0.1.0/jqueue/ports/storage.py +81 -0
  25. jqueue-0.1.0/ports-and-adapters.md +219 -0
  26. jqueue-0.1.0/pyproject.toml +62 -0
  27. jqueue-0.1.0/tests/__init__.py +0 -0
  28. jqueue-0.1.0/tests/test_broker_queue.py +200 -0
  29. jqueue-0.1.0/tests/test_codec.py +80 -0
  30. jqueue-0.1.0/tests/test_direct_queue.py +272 -0
  31. jqueue-0.1.0/tests/test_domain_errors.py +61 -0
  32. jqueue-0.1.0/tests/test_domain_models.py +331 -0
  33. jqueue-0.1.0/tests/test_group_commit.py +299 -0
  34. jqueue-0.1.0/tests/test_heartbeat.py +129 -0
  35. jqueue-0.1.0/tests/test_storage_filesystem.py +100 -0
  36. jqueue-0.1.0/tests/test_storage_gcs.py +177 -0
  37. jqueue-0.1.0/tests/test_storage_memory.py +109 -0
  38. jqueue-0.1.0/tests/test_storage_s3.py +218 -0
  39. jqueue-0.1.0/uv.lock +1411 -0
@@ -0,0 +1,54 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ name: Lint & type-check
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v5
18
+ with:
19
+ enable-cache: true
20
+
21
+ - name: Set up Python 3.12
22
+ run: uv python install 3.12
23
+
24
+ - name: Install dependencies
25
+ run: uv sync --extra dev
26
+
27
+ - name: ruff format
28
+ run: uv run ruff format --check .
29
+
30
+ - name: ruff check
31
+ run: uv run ruff check .
32
+
33
+ - name: mypy
34
+ run: uv run mypy .
35
+
36
+ test:
37
+ name: Test (Python 3.12)
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@v5
44
+ with:
45
+ enable-cache: true
46
+
47
+ - name: Set up Python 3.12
48
+ run: uv python install 3.12
49
+
50
+ - name: Install dependencies
51
+ run: uv sync --extra s3 --extra gcs --extra dev
52
+
53
+ - name: pytest
54
+ run: uv run pytest tests/ -v
@@ -0,0 +1,76 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ lint:
9
+ name: Lint & type-check
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ enable-cache: true
18
+
19
+ - name: Set up Python 3.12
20
+ run: uv python install 3.12
21
+
22
+ - name: Install dependencies
23
+ run: uv sync --extra dev
24
+
25
+ - name: ruff format
26
+ run: uv run ruff format --check .
27
+
28
+ - name: ruff check
29
+ run: uv run ruff check .
30
+
31
+ - name: mypy
32
+ run: uv run mypy .
33
+
34
+ test:
35
+ name: Test (Python 3.12)
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@v5
42
+ with:
43
+ enable-cache: true
44
+
45
+ - name: Set up Python 3.12
46
+ run: uv python install 3.12
47
+
48
+ - name: Install dependencies
49
+ run: uv sync --extra s3 --extra gcs --extra dev
50
+
51
+ - name: pytest
52
+ run: uv run pytest tests/ -v
53
+
54
+ publish:
55
+ name: Build & publish to PyPI
56
+ runs-on: ubuntu-latest
57
+ needs: [lint, test]
58
+ environment: pypi
59
+ permissions:
60
+ id-token: write # required for OIDC trusted publishing
61
+ steps:
62
+ - uses: actions/checkout@v4
63
+
64
+ - name: Install uv
65
+ uses: astral-sh/setup-uv@v5
66
+ with:
67
+ enable-cache: true
68
+
69
+ - name: Set up Python 3.12
70
+ run: uv python install 3.12
71
+
72
+ - name: Build package
73
+ run: uv build
74
+
75
+ - name: Publish to PyPI
76
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,41 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ *.so
7
+
8
+ # Virtual environments
9
+ .venv/
10
+ venv/
11
+ env/
12
+
13
+ # Distribution / packaging
14
+ dist/
15
+ build/
16
+ *.egg-info/
17
+ *.egg
18
+
19
+ # uv
20
+ .uv/
21
+
22
+ # pytest
23
+ .pytest_cache/
24
+ .coverage
25
+ htmlcov/
26
+
27
+ # mypy
28
+ .mypy_cache/
29
+ .dmypy.json
30
+
31
+ # ruff
32
+ .ruff_cache/
33
+
34
+ # macOS
35
+ .DS_Store
36
+
37
+ # Editors
38
+ .idea/
39
+ .vscode/
40
+ *.swp
41
+ *.swo
jqueue-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JB
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.