django-queuebie 0.3.3__tar.gz → 0.3.6__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 (80) hide show
  1. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.ambient-package-update/metadata.py +1 -0
  2. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.github/workflows/ci.yml +12 -10
  3. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.gitignore +4 -1
  4. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.pre-commit-config.yaml +20 -15
  5. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.readthedocs.yaml +1 -1
  6. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/CHANGES.md +9 -0
  7. django_queuebie-0.3.6/CONTRIBUTING.md +75 -0
  8. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/PKG-INFO +70 -129
  9. django_queuebie-0.3.6/README.md +138 -0
  10. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/SECURITY.md +1 -1
  11. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/conf.py +0 -1
  12. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/manage.py +1 -1
  13. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/pyproject.toml +54 -42
  14. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/__init__.py +1 -1
  15. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/registry.py +1 -1
  16. django_queuebie-0.3.6/scripts/unix/install_requirements.sh +3 -0
  17. django_queuebie-0.3.6/scripts/unix/publish_to_pypi.sh +4 -0
  18. django_queuebie-0.3.6/scripts/windows/install_requirements.ps1 +2 -0
  19. django_queuebie-0.3.6/scripts/windows/publish_to_pypi.ps1 +3 -0
  20. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_database_blocker.py +1 -1
  21. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_registry.py +4 -3
  22. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_runner.py +3 -4
  23. django_queuebie-0.3.6/uv.lock +997 -0
  24. django_queuebie-0.3.3/README.md +0 -206
  25. django_queuebie-0.3.3/scripts/unix/install_requirements.sh +0 -4
  26. django_queuebie-0.3.3/scripts/unix/publish_to_pypi.sh +0 -3
  27. django_queuebie-0.3.3/scripts/windows/install_requirements.ps1 +0 -3
  28. django_queuebie-0.3.3/scripts/windows/publish_to_pypi.ps1 +0 -2
  29. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.ambient-package-update/templates/snippets/content.tpl +0 -0
  30. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.ambient-package-update/templates/snippets/tagline.tpl +0 -0
  31. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/.editorconfig +0 -0
  32. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/LICENSE +0 -0
  33. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/LICENSE.md +0 -0
  34. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/MANIFEST.in +0 -0
  35. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/Makefile +0 -0
  36. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/changelog.rst +0 -0
  37. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/getting-started.md +0 -0
  38. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/introduction.md +0 -0
  39. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/motivation.md +0 -0
  40. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/settings.md +0 -0
  41. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/features/setup.md +0 -0
  42. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/index.rst +0 -0
  43. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/docs/make.bat +0 -0
  44. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/apps.py +0 -0
  45. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/database_blocker.py +0 -0
  46. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/exceptions.py +0 -0
  47. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/logger.py +0 -0
  48. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/management/__init__.py +0 -0
  49. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/management/commands/__init__.py +0 -0
  50. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/management/commands/clear_queuebie_registry.py +0 -0
  51. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/messages.py +0 -0
  52. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/runner.py +0 -0
  53. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/settings.py +0 -0
  54. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/queuebie/utils.py +0 -0
  55. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/settings.py +0 -0
  56. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/__init__.py +0 -0
  57. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/handlers/__init__.py +0 -0
  58. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/handlers/commands/__init__.py +0 -0
  59. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/handlers/commands/testapp.py +0 -0
  60. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/handlers/events/__init__.py +0 -0
  61. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/handlers/events/testapp.py +0 -0
  62. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/__init__.py +0 -0
  63. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/commands/__init__.py +0 -0
  64. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/commands/my_commands.py +0 -0
  65. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/commands/other_commands.py +0 -0
  66. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/events/__init__.py +0 -0
  67. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/messages/events/my_events.py +0 -0
  68. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/testapp/urls.py +0 -0
  69. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/__init__.py +0 -0
  70. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/helpers/__init__.py +0 -0
  71. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/helpers/commands.py +0 -0
  72. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/helpers/events.py +0 -0
  73. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/management_commands/__init__.py +0 -0
  74. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/management_commands/test_clear_queuebie_registry.py +0 -0
  75. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_apps.py +0 -0
  76. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_exceptions.py +0 -0
  77. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_logger.py +0 -0
  78. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_messages.py +0 -0
  79. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_settings.py +0 -0
  80. {django_queuebie-0.3.3 → django_queuebie-0.3.6}/tests/test_utils.py +0 -0
@@ -27,6 +27,7 @@ METADATA = PackageMetadata(
27
27
  development_status=DEPLOYMENT_STATUS_BETA,
28
28
  has_migrations=False,
29
29
  main_branch="main",
30
+ claim="A simple and synchronous message queue for commands and events for Django",
30
31
  readme_content=ReadmeContent(uses_internationalisation=True),
31
32
  dependencies=[
32
33
  f"Django>={SUPPORTED_DJANGO_VERSIONS[0]}",
@@ -12,17 +12,16 @@ jobs:
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
14
 
15
- - name: Set up Python 3.12
15
+ - name: Set up Python 3.13
16
16
  uses: actions/setup-python@v5
17
17
  with:
18
- python-version: "3.12"
18
+ python-version: "3.13"
19
19
 
20
20
  - name: Install required packages
21
21
  run: pip install pre-commit
22
22
 
23
23
  - name: Run pre-commit hooks
24
- run: pre-commit run --all-files --hook-stage push
25
-
24
+ run: pre-commit run --all-files
26
25
 
27
26
  tests:
28
27
  name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
@@ -46,8 +45,10 @@ jobs:
46
45
  uses: actions/setup-python@v5
47
46
  with:
48
47
  python-version: ${{ matrix.python-version }}
48
+ - name: Install uv
49
+ uses: astral-sh/setup-uv@v5
49
50
  - name: Install tox
50
- run: pip install tox
51
+ run: uv pip install --system tox tox-uv
51
52
  - name: Run Tests
52
53
  env:
53
54
  TOXENV: django${{ matrix.django-version }}
@@ -56,7 +57,7 @@ jobs:
56
57
  uses: actions/upload-artifact@v4
57
58
  with:
58
59
  name: coverage-data-${{ matrix.python-version }}-${{ matrix.django-version }}
59
- path: '${{ github.workspace }}/.coverage.*'
60
+ path: '${{ github.workspace }}/.coverage'
60
61
  include-hidden-files: true
61
62
  if-no-files-found: error
62
63
 
@@ -69,7 +70,7 @@ jobs:
69
70
 
70
71
  - uses: actions/setup-python@v5
71
72
  with:
72
- python-version: '3.12'
73
+ python-version: '3.13'
73
74
 
74
75
  - name: Install dependencies
75
76
  run: python -m pip install --upgrade coverage[toml]
@@ -77,13 +78,14 @@ jobs:
77
78
  - name: Download data
78
79
  uses: actions/download-artifact@v4
79
80
  with:
80
- path: ${{ github.workspace }}
81
+ path: ${{ github.workspace }}/coverage-reports
81
82
  pattern: coverage-data-*
82
- merge-multiple: true
83
+ merge-multiple: false
83
84
 
84
85
  - name: Combine coverage and fail if it's <100.0%
85
86
  run: |
86
- python -m coverage combine
87
+ python -m coverage combine coverage-reports/*/.coverage
88
+ python -m coverage xml
87
89
  python -m coverage html --skip-covered --skip-empty
88
90
  python -m coverage report --fail-under=100.0
89
91
  echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
@@ -140,7 +140,7 @@ cython_debug/
140
140
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
141
141
  .idea/
142
142
 
143
- # Requirements.txt is managed by pip-tools
143
+ # Deprecated dependency files
144
144
  requirements.txt
145
145
 
146
146
  # sphinx build folder
@@ -156,3 +156,6 @@ _build
156
156
 
157
157
  # Test databases
158
158
  *.sqlite
159
+
160
+ # AI
161
+ .claude/
@@ -3,36 +3,36 @@
3
3
 
4
4
  repos:
5
5
  - repo: https://github.com/astral-sh/ruff-pre-commit
6
- rev: v0.11.2
6
+ rev: v0.14.0
7
7
  hooks:
8
8
  # Run the Ruff formatter.
9
9
  - id: ruff-format
10
10
  # Run the Ruff linter.
11
- - id: ruff
11
+ - id: ruff-check
12
12
  args: [--fix, --exit-non-zero-on-fix]
13
13
 
14
14
  - repo: https://github.com/adamchainz/blacken-docs
15
- rev: 1.19.1
15
+ rev: 1.20.0
16
16
  hooks:
17
17
  - id: blacken-docs
18
18
  additional_dependencies:
19
- - black==25.1.0
19
+ - black==25.9.0
20
20
  files: '(?:README\.md|\.ambient-package-update\/templates\/snippets\/.*\.tpl|docs\/.*\.(?:md|rst))'
21
21
 
22
22
  - repo: https://github.com/asottile/pyupgrade
23
- rev: v3.19.1
23
+ rev: v3.20.0
24
24
  hooks:
25
25
  - id: pyupgrade
26
26
  args: [ --py310-plus ]
27
27
 
28
28
  - repo: https://github.com/adamchainz/django-upgrade
29
- rev: 1.24.0
29
+ rev: 1.29.0
30
30
  hooks:
31
31
  - id: django-upgrade
32
32
  args: [--target-version, "4.2"]
33
33
 
34
34
  - repo: https://github.com/adamchainz/djade-pre-commit
35
- rev: 1.3.2
35
+ rev: 1.6.0
36
36
  hooks:
37
37
  - id: djade
38
38
  args: [--target-version, "4.2"]
@@ -43,12 +43,17 @@ repos:
43
43
  )$
44
44
 
45
45
  - repo: https://github.com/pre-commit/pre-commit-hooks
46
- rev: v5.0.0
46
+ rev: v6.0.0
47
47
  hooks:
48
- - id: no-commit-to-branch
49
- args:
50
- [
51
- "--pattern",
52
- '^^(?!(?:feature|hotfix|bugfix|refactor|maintenance)/[\w\d\-_#]+).*$',
53
- ]
54
- stages: [ pre-commit ]
48
+ - id: check-ast
49
+ - id: check-builtin-literals
50
+ - id: check-case-conflict
51
+ - id: check-docstring-first
52
+ - id: check-executables-have-shebangs
53
+ - id: check-json
54
+ - id: check-merge-conflict
55
+ - id: check-toml
56
+ - id: end-of-file-fixer
57
+ - id: fix-byte-order-marker
58
+ - id: mixed-line-ending
59
+ - id: trailing-whitespace
@@ -9,7 +9,7 @@ version: 2
9
9
  build:
10
10
  os: ubuntu-24.04
11
11
  tools:
12
- python: "3.12"
12
+ python: "3.13"
13
13
 
14
14
  # Build documentation in the "docs/" directory with Sphinx
15
15
  sphinx:
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ **0.3.6** (2025-10-10)
4
+ * Maintenance updates via ambient-package-update
5
+
6
+ **0.3.5** (2025-10-09)
7
+ * Maintenance updates via ambient-package-update
8
+
9
+ **0.3.4** (2025-05-29)
10
+ * Maintenance updates via ambient-package-update
11
+
3
12
  **0.3.3** (2025-04-03)
4
13
  * Clarified package tagline
5
14
 
@@ -0,0 +1,75 @@
1
+ # Contribute
2
+
3
+ ## Setup package for development
4
+
5
+ - Create a Python virtualenv and activate it
6
+ - Install "uv" with `pip install -U uv`
7
+ - Sync the requirements with `uv sync --frozen --group dev`
8
+
9
+ ## Add functionality
10
+
11
+ - Create a new branch for your feature
12
+ - Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
13
+ `-e /Users/workspace/django-queuebie` or via pip `pip install -e /Users/workspace/django-queuebie`
14
+ - Ensure the code passes the tests
15
+ - Create a pull request
16
+
17
+ ## Run tests
18
+
19
+ - Run tests
20
+ ````
21
+ pytest --ds settings tests
22
+ ````
23
+
24
+ - Check coverage
25
+ ````
26
+ coverage run -m pytest --ds settings tests
27
+ coverage report -m
28
+ ````
29
+
30
+ ## Git hooks (via pre-commit)
31
+
32
+ We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
33
+ vain.
34
+
35
+ To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
36
+
37
+ pre-commit install -t pre-push -t pre-commit --install-hooks
38
+
39
+ This will permanently install the git hooks for both, frontend and backend, in your local
40
+ [`.git/hooks`](./.git/hooks) folder.
41
+ The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
42
+
43
+ You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
44
+
45
+ pre-commit run [hook-id] [options]
46
+
47
+ Example: run single hook
48
+
49
+ pre-commit run ruff --all-files
50
+
51
+ Example: run all hooks of pre-push stage
52
+
53
+ pre-commit run --all-files
54
+
55
+ ## Update documentation
56
+
57
+ - To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
58
+ - Open `docs/_build/html/index.html` to see the documentation.
59
+
60
+ ### Translation files
61
+
62
+ If you have added custom text, make sure to wrap it in `_()` where `_` is
63
+ gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
64
+
65
+ How to create translation file:
66
+
67
+ * Navigate to `queuebie`
68
+ * `python manage.py makemessages -l de`
69
+ * Have a look at the new/changed files within `queuebie/locale`
70
+
71
+ How to compile translation files:
72
+
73
+ * Navigate to `queuebie`
74
+ * `python manage.py compilemessages`
75
+ * Have a look at the new/changed files within `queuebie/locale`
@@ -1,9 +1,36 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: django-queuebie
3
- Version: 0.3.3
3
+ Version: 0.3.6
4
4
  Summary: A simple and synchronous message queue for commands and events for Django
5
+ Project-URL: Homepage, https://github.com/ambient-innovation/django-queuebie/
6
+ Project-URL: Documentation, https://django-queuebie.readthedocs.io/en/latest/index.html
7
+ Project-URL: Maintained by, https://ambient.digital/
8
+ Project-URL: Bugtracker, https://github.com/ambient-innovation/django-queuebie/issues
9
+ Project-URL: Changelog, https://django-queuebie.readthedocs.io/en/latest/features/changelog.html
5
10
  Author-email: Ambient Digital <hello@ambient.digital>
6
- Description-Content-Type: text/markdown
11
+ License: MIT License
12
+
13
+ Copyright (c) 2025 Ambient Innovation: GmbH
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+ License-File: LICENSE
33
+ License-File: LICENSE.md
7
34
  Classifier: Development Status :: 4 - Beta
8
35
  Classifier: Environment :: Web Environment
9
36
  Classifier: Framework :: Django
@@ -21,26 +48,9 @@ Classifier: Programming Language :: Python :: 3.11
21
48
  Classifier: Programming Language :: Python :: 3.12
22
49
  Classifier: Programming Language :: Python :: 3.13
23
50
  Classifier: Topic :: Utilities
24
- Requires-Dist: Django>=4.2
25
- Requires-Dist: typer~=0.12 ; extra == "dev"
26
- Requires-Dist: pytest-django~=4.9 ; extra == "dev"
27
- Requires-Dist: pytest-mock~=3.14 ; extra == "dev"
28
- Requires-Dist: coverage~=7.6 ; extra == "dev"
29
- Requires-Dist: pre-commit~=4.0 ; extra == "dev"
30
- Requires-Dist: ruff~=0.6 ; extra == "dev"
31
- Requires-Dist: sphinx~=7.1 ; extra == "dev"
32
- Requires-Dist: sphinx-rtd-theme~=2.0 ; extra == "dev"
33
- Requires-Dist: m2r2==0.3.3.post2 ; extra == "dev"
34
- Requires-Dist: mistune<2.0.0 ; extra == "dev"
35
- Requires-Dist: flit~=3.9 ; extra == "dev"
36
- Requires-Dist: keyring~=25.4 ; extra == "dev"
37
- Requires-Dist: ambient-package-update ; extra == "dev"
38
- Project-URL: Bugtracker, https://github.com/ambient-innovation/django-queuebie/issues
39
- Project-URL: Changelog, https://django-queuebie.readthedocs.io/en/latest/features/changelog.html
40
- Project-URL: Documentation, https://django-queuebie.readthedocs.io/en/latest/index.html
41
- Project-URL: Homepage, https://github.com/ambient-innovation/django-queuebie/
42
- Project-URL: Maintained by, https://ambient.digital/
43
- Provides-Extra: dev
51
+ Requires-Python: >=3.10
52
+ Requires-Dist: django>=4.2
53
+ Description-Content-Type: text/markdown
44
54
 
45
55
  [![PyPI release](https://img.shields.io/pypi/v/django-queuebie.svg)](https://pypi.org/project/django-queuebie/)
46
56
  [![Downloads](https://static.pepy.tech/badge/django-queuebie)](https://pepy.tech/project/django-queuebie)
@@ -51,11 +61,9 @@ Provides-Extra: dev
51
61
 
52
62
  A simple and synchronous message queue for commands and events for Django.
53
63
 
54
- * [PyPI](https://pypi.org/project/django-queuebie/)
55
- * [GitHub](https://github.com/ambient-innovation/django-queuebie)
56
- * [Full documentation](https://django-queuebie.readthedocs.io/en/latest/index.html)
57
- * Creator & Maintainer: [Ambient Digital](https://ambient.digital/)
64
+ [PyPI](https://pypi.org/project/django-queuebie/) | [GitHub](https://github.com/ambient-innovation/django-queuebie) | [Full documentation](https://django-queuebie.readthedocs.io/en/latest/index.html)
58
65
 
66
+ Creator & Maintainer: [Ambient Digital](https://ambient.digital/)
59
67
 
60
68
  ## Features
61
69
 
@@ -117,99 +125,18 @@ handle_message(
117
125
 
118
126
  `pip install django_queuebie`
119
127
 
120
- or via pipenv:
128
+ or via uv:
121
129
 
122
- `pipenv install django_queuebie`
130
+ `uv add django_queuebie`
123
131
 
124
132
  - Add module to `INSTALLED_APPS` within the main django `settings.py`:
125
133
 
126
- ```python
127
- INSTALLED_APPS = (
128
- # ...
129
- "queuebie",
130
- )
131
- ```
132
-
133
-
134
-
135
- ## Contribute
136
-
137
- ### Setup package for development
138
-
139
- - Create a Python virtualenv and activate it
140
- - Install "pip-tools" with `pip install -U pip-tools`
141
- - Compile the requirements with `pip-compile --extra dev, -o requirements.txt pyproject.toml --resolver=backtracking`
142
- - Sync the dependencies with your virtualenv with `pip-sync`
143
-
144
- ### Add functionality
145
-
146
- - Create a new branch for your feature
147
- - Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
148
- `-e /Users/workspace/django-queuebie` or via pip `pip install -e /Users/workspace/django-queuebie`
149
- - Ensure the code passes the tests
150
- - Create a pull request
151
-
152
- ### Run tests
153
-
154
- - Run tests
155
- ````
156
- pytest --ds settings tests
157
- ````
158
-
159
- - Check coverage
160
- ````
161
- coverage run -m pytest --ds settings tests
162
- coverage report -m
163
- ````
164
-
165
- ### Git hooks (via pre-commit)
166
-
167
- We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
168
- vain.
169
-
170
- To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
171
-
172
- pre-commit install -t pre-push -t pre-commit --install-hooks
173
-
174
- This will permanently install the git hooks for both, frontend and backend, in your local
175
- [`.git/hooks`](./.git/hooks) folder.
176
- The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
177
-
178
- You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
179
-
180
- pre-commit run [hook-id] [options]
181
-
182
- Example: run single hook
183
-
184
- pre-commit run ruff --all-files
185
-
186
- Example: run all hooks of pre-push stage
187
-
188
- pre-commit run --all-files --hook-stage push
189
-
190
- ### Update documentation
191
-
192
- - To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
193
- - Open `docs/_build/html/index.html` to see the documentation.
194
-
195
-
196
- ### Translation files
197
-
198
- If you have added custom text, make sure to wrap it in `_()` where `_` is
199
- gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
200
-
201
- How to create translation file:
202
-
203
- * Navigate to `django-queuebie`
204
- * `python manage.py makemessages -l de`
205
- * Have a look at the new/changed files within `queuebie/locale`
206
-
207
- How to compile translation files:
208
-
209
- * Navigate to `django-queuebie`
210
- * `python manage.py compilemessages`
211
- * Have a look at the new/changed files within `queuebie/locale`
212
-
134
+ ```python
135
+ INSTALLED_APPS = (
136
+ # ...
137
+ "queuebie",
138
+ )
139
+ ```
213
140
 
214
141
  ### Publish to ReadTheDocs.io
215
142
 
@@ -217,27 +144,43 @@ How to compile translation files:
217
144
  - Trigger new build at ReadTheDocs.io (follow instructions in admin panel at RTD) if the GitHub webhook is not yet set
218
145
  up.
219
146
 
220
- ### Publish to PyPi
147
+ ### Preparation and building
148
+
149
+ This package uses [uv](https://github.com/astral-sh/uv) for dependency management and building.
221
150
 
222
151
  - Update documentation about new/changed functionality
223
152
 
224
- - Update the `Changelog`
153
+ - Update the `CHANGES.md`
225
154
 
226
155
  - Increment version in main `__init__.py`
227
156
 
228
- - Create pull request / merge to main
157
+ - Create pull request / merge to "main"
229
158
 
230
- - This project uses the flit package to publish to PyPI. Thus, publishing should be as easy as running:
231
- ```
232
- flit publish
159
+ - This project uses uv to publish to PyPI. This will create distribution files in the `dist/` directory.
160
+
161
+ ```bash
162
+ uv build
233
163
  ```
234
164
 
235
- To publish to TestPyPI use the following to ensure that you have set up your .pypirc as
236
- shown [here](https://flit.readthedocs.io/en/latest/upload.html#using-pypirc) and use the following command:
165
+ ### Publishing to PyPI
237
166
 
238
- ```
239
- flit publish --repository testpypi
240
- ```
167
+ To publish to the production PyPI:
168
+
169
+ ```bash
170
+ uv publish
171
+ ```
172
+
173
+ To publish to TestPyPI first (recommended for testing):
174
+
175
+ ```bash
176
+ uv publish --publish-url https://test.pypi.org/legacy/
177
+ ```
178
+
179
+ You can then test the installation from TestPyPI:
180
+
181
+ ```bash
182
+ uv pip install --index-url https://test.pypi.org/simple/ ambient-package-update
183
+ ```
241
184
 
242
185
  ### Maintenance
243
186
 
@@ -247,5 +190,3 @@ configuration and setup files. It works similar to well-known updaters like `pyu
247
190
 
248
191
  To run an update, refer to the [documentation page](https://pypi.org/project/ambient-package-update/)
249
192
  of the "ambient-package-update".
250
-
251
-
@@ -0,0 +1,138 @@
1
+ [![PyPI release](https://img.shields.io/pypi/v/django-queuebie.svg)](https://pypi.org/project/django-queuebie/)
2
+ [![Downloads](https://static.pepy.tech/badge/django-queuebie)](https://pepy.tech/project/django-queuebie)
3
+ [![Coverage](https://img.shields.io/badge/Coverage-100.0%25-success)](https://github.com/ambient-innovation/django-queuebie/actions?workflow=CI)
4
+ [![Linting](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
5
+ [![Coding Style](https://img.shields.io/badge/code%20style-Ruff-000000.svg)](https://github.com/astral-sh/ruff)
6
+ [![Documentation Status](https://readthedocs.org/projects/django-queuebie/badge/?version=latest)](https://django-queuebie.readthedocs.io/en/latest/?badge=latest)
7
+
8
+ A simple and synchronous message queue for commands and events for Django.
9
+
10
+ [PyPI](https://pypi.org/project/django-queuebie/) | [GitHub](https://github.com/ambient-innovation/django-queuebie) | [Full documentation](https://django-queuebie.readthedocs.io/en/latest/index.html)
11
+
12
+ Creator & Maintainer: [Ambient Digital](https://ambient.digital/)
13
+
14
+ ## Features
15
+
16
+ * Split up your business logic in commands and events
17
+ * Commands are imperatives telling your system what to do, events reflect that something has happened
18
+ * Register light-weight functions via a decorator to listen to your commands and events
19
+ * Message handlers receive the context of the message (command or event), providing an explicit API
20
+ * No magic, no side effects since the queue works synchronously
21
+
22
+ ```python
23
+ import dataclasses
24
+
25
+ from queuebie.runner import handle_message
26
+ from queuebie.messages import Command, Event
27
+ from queuebie import message_registry
28
+
29
+
30
+ # Example command
31
+ @dataclasses.dataclass(kw_only=True)
32
+ class BuyProduct(Command):
33
+ product_id: int
34
+ customer_id: int
35
+ price: float
36
+ currency: str
37
+
38
+
39
+ # Example event
40
+ @dataclasses.dataclass(kw_only=True)
41
+ class ProductBought(Event):
42
+ product_id: int
43
+ customer_id: int
44
+
45
+
46
+ # Example handler
47
+ @message_registry.register_command(BuyProduct)
48
+ def handle_buy_product(context: BuyProduct) -> Event:
49
+ # Here lives your business logic
50
+
51
+ return ProductBought(
52
+ product_id=context.product_id,
53
+ customer_id=context.customer_id,
54
+ )
55
+
56
+
57
+ # Start queue and process messages
58
+ handle_message(
59
+ BuyProduct(
60
+ product_id=product.id,
61
+ customer_id=customer.id,
62
+ price=12.99,
63
+ currency="EUR",
64
+ )
65
+ )
66
+ ```
67
+
68
+ ## Installation
69
+
70
+ - Install the package via pip:
71
+
72
+ `pip install django_queuebie`
73
+
74
+ or via uv:
75
+
76
+ `uv add django_queuebie`
77
+
78
+ - Add module to `INSTALLED_APPS` within the main django `settings.py`:
79
+
80
+ ```python
81
+ INSTALLED_APPS = (
82
+ # ...
83
+ "queuebie",
84
+ )
85
+ ```
86
+
87
+ ### Publish to ReadTheDocs.io
88
+
89
+ - Fetch the latest changes in GitHub mirror and push them
90
+ - Trigger new build at ReadTheDocs.io (follow instructions in admin panel at RTD) if the GitHub webhook is not yet set
91
+ up.
92
+
93
+ ### Preparation and building
94
+
95
+ This package uses [uv](https://github.com/astral-sh/uv) for dependency management and building.
96
+
97
+ - Update documentation about new/changed functionality
98
+
99
+ - Update the `CHANGES.md`
100
+
101
+ - Increment version in main `__init__.py`
102
+
103
+ - Create pull request / merge to "main"
104
+
105
+ - This project uses uv to publish to PyPI. This will create distribution files in the `dist/` directory.
106
+
107
+ ```bash
108
+ uv build
109
+ ```
110
+
111
+ ### Publishing to PyPI
112
+
113
+ To publish to the production PyPI:
114
+
115
+ ```bash
116
+ uv publish
117
+ ```
118
+
119
+ To publish to TestPyPI first (recommended for testing):
120
+
121
+ ```bash
122
+ uv publish --publish-url https://test.pypi.org/legacy/
123
+ ```
124
+
125
+ You can then test the installation from TestPyPI:
126
+
127
+ ```bash
128
+ uv pip install --index-url https://test.pypi.org/simple/ ambient-package-update
129
+ ```
130
+
131
+ ### Maintenance
132
+
133
+ Please note that this package supports the [ambient-package-update](https://pypi.org/project/ambient-package-update/).
134
+ So you don't have to worry about the maintenance of this package. This updater is rendering all important
135
+ configuration and setup files. It works similar to well-known updaters like `pyupgrade` or `django-upgrade`.
136
+
137
+ To run an update, refer to the [documentation page](https://pypi.org/project/ambient-package-update/)
138
+ of the "ambient-package-update".
@@ -4,7 +4,7 @@ The maintainers of this package take security bugs seriously. We appreciate your
4
4
  disclose your findings, and will make every effort to acknowledge your contributions.
5
5
 
6
6
  To report a security issue, please use the GitHub Security
7
- Advisory ["Report a Vulnerability"](https://github.com/ambient-innovation/django-queuebie/security/advisories/new)
7
+ Advisory ["Report a Vulnerability"](https://github.com/ambient-innovation/django-queuebie/security/advisories/new)
8
8
  tab.
9
9
 
10
10
  The maintainers will send a response indicating the next steps in handling your report. After the initial reply to
@@ -62,7 +62,6 @@ templates_path = ["_templates"]
62
62
  # This pattern also affects html_static_path and html_extra_path.
63
63
  exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
64
64
 
65
-
66
65
  # -- Options for HTML output -------------------------------------------------
67
66
 
68
67
  # The theme to use for HTML and HTML Help pages. See the documentation for
@@ -9,7 +9,7 @@ def main():
9
9
  """Run administrative tasks."""
10
10
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
11
11
  try:
12
- from django.core.management import execute_from_command_line
12
+ from django.core.management import execute_from_command_line # noqa: PLC0415
13
13
  except ImportError as exc:
14
14
  raise ImportError( # noqa: TRY003
15
15
  "Couldn't import Django. Are you sure it's installed and "