django-queuebie 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 (71) hide show
  1. django_queuebie-0.1.0/.ambient-package-update/metadata.py +50 -0
  2. django_queuebie-0.1.0/.ambient-package-update/templates/snippets/content.tpl +7 -0
  3. django_queuebie-0.1.0/.ambient-package-update/templates/snippets/tagline.tpl +1 -0
  4. django_queuebie-0.1.0/.editorconfig +17 -0
  5. django_queuebie-0.1.0/.github/workflows/ci.yml +92 -0
  6. django_queuebie-0.1.0/.gitignore +160 -0
  7. django_queuebie-0.1.0/.pre-commit-config.yaml +54 -0
  8. django_queuebie-0.1.0/.readthedocs.yaml +31 -0
  9. django_queuebie-0.1.0/CHANGES.md +4 -0
  10. django_queuebie-0.1.0/LICENSE +21 -0
  11. django_queuebie-0.1.0/LICENSE.md +21 -0
  12. django_queuebie-0.1.0/MANIFEST.in +4 -0
  13. django_queuebie-0.1.0/PKG-INFO +205 -0
  14. django_queuebie-0.1.0/README.md +160 -0
  15. django_queuebie-0.1.0/SECURITY.md +18 -0
  16. django_queuebie-0.1.0/docs/Makefile +20 -0
  17. django_queuebie-0.1.0/docs/conf.py +82 -0
  18. django_queuebie-0.1.0/docs/features/changelog.rst +2 -0
  19. django_queuebie-0.1.0/docs/features/getting-started.md +98 -0
  20. django_queuebie-0.1.0/docs/features/introduction.md +53 -0
  21. django_queuebie-0.1.0/docs/features/motivation.md +14 -0
  22. django_queuebie-0.1.0/docs/features/settings.md +41 -0
  23. django_queuebie-0.1.0/docs/features/setup.md +41 -0
  24. django_queuebie-0.1.0/docs/index.rst +21 -0
  25. django_queuebie-0.1.0/docs/make.bat +35 -0
  26. django_queuebie-0.1.0/manage.py +23 -0
  27. django_queuebie-0.1.0/pyproject.toml +261 -0
  28. django_queuebie-0.1.0/queuebie/__init__.py +8 -0
  29. django_queuebie-0.1.0/queuebie/apps.py +15 -0
  30. django_queuebie-0.1.0/queuebie/exceptions.py +17 -0
  31. django_queuebie-0.1.0/queuebie/logger.py +10 -0
  32. django_queuebie-0.1.0/queuebie/management/__init__.py +0 -0
  33. django_queuebie-0.1.0/queuebie/management/commands/__init__.py +0 -0
  34. django_queuebie-0.1.0/queuebie/management/commands/clear_queuebie_registry.py +13 -0
  35. django_queuebie-0.1.0/queuebie/messages.py +39 -0
  36. django_queuebie-0.1.0/queuebie/registry.py +153 -0
  37. django_queuebie-0.1.0/queuebie/runner.py +58 -0
  38. django_queuebie-0.1.0/queuebie/settings.py +32 -0
  39. django_queuebie-0.1.0/queuebie/utils.py +30 -0
  40. django_queuebie-0.1.0/scripts/unix/install_requirements.sh +4 -0
  41. django_queuebie-0.1.0/scripts/unix/publish_to_pypi.sh +3 -0
  42. django_queuebie-0.1.0/scripts/windows/install_requirements.ps1 +3 -0
  43. django_queuebie-0.1.0/scripts/windows/publish_to_pypi.ps1 +2 -0
  44. django_queuebie-0.1.0/settings.py +79 -0
  45. django_queuebie-0.1.0/testapp/__init__.py +0 -0
  46. django_queuebie-0.1.0/testapp/handlers/__init__.py +0 -0
  47. django_queuebie-0.1.0/testapp/handlers/commands/__init__.py +0 -0
  48. django_queuebie-0.1.0/testapp/handlers/commands/testapp.py +28 -0
  49. django_queuebie-0.1.0/testapp/handlers/events/__init__.py +0 -0
  50. django_queuebie-0.1.0/testapp/handlers/events/testapp.py +11 -0
  51. django_queuebie-0.1.0/testapp/messages/__init__.py +0 -0
  52. django_queuebie-0.1.0/testapp/messages/commands/__init__.py +0 -0
  53. django_queuebie-0.1.0/testapp/messages/commands/my_commands.py +18 -0
  54. django_queuebie-0.1.0/testapp/messages/commands/other_commands.py +8 -0
  55. django_queuebie-0.1.0/testapp/messages/events/__init__.py +0 -0
  56. django_queuebie-0.1.0/testapp/messages/events/my_events.py +8 -0
  57. django_queuebie-0.1.0/testapp/urls.py +7 -0
  58. django_queuebie-0.1.0/tests/__init__.py +0 -0
  59. django_queuebie-0.1.0/tests/helpers/__init__.py +0 -0
  60. django_queuebie-0.1.0/tests/helpers/commands.py +8 -0
  61. django_queuebie-0.1.0/tests/helpers/events.py +8 -0
  62. django_queuebie-0.1.0/tests/management_commands/__init__.py +0 -0
  63. django_queuebie-0.1.0/tests/management_commands/test_clear_queuebie_registry.py +27 -0
  64. django_queuebie-0.1.0/tests/test_apps.py +25 -0
  65. django_queuebie-0.1.0/tests/test_exceptions.py +23 -0
  66. django_queuebie-0.1.0/tests/test_logger.py +11 -0
  67. django_queuebie-0.1.0/tests/test_messages.py +16 -0
  68. django_queuebie-0.1.0/tests/test_registry.py +189 -0
  69. django_queuebie-0.1.0/tests/test_runner.py +117 -0
  70. django_queuebie-0.1.0/tests/test_settings.py +45 -0
  71. django_queuebie-0.1.0/tests/test_utils.py +38 -0
@@ -0,0 +1,50 @@
1
+ from ambient_package_update.metadata.author import PackageAuthor
2
+ from ambient_package_update.metadata.constants import (
3
+ DEPLOYMENT_STATUS_BETA,
4
+ DEV_DEPENDENCIES,
5
+ LICENSE_MIT,
6
+ SUPPORTED_DJANGO_VERSIONS,
7
+ )
8
+ from ambient_package_update.metadata.maintainer import PackageMaintainer
9
+ from ambient_package_update.metadata.package import PackageMetadata
10
+ from ambient_package_update.metadata.readme import ReadmeContent
11
+ from ambient_package_update.metadata.ruff_ignored_inspection import RuffIgnoredInspection
12
+
13
+ METADATA = PackageMetadata(
14
+ package_name="django_queuebie",
15
+ module_name="queuebie",
16
+ github_package_group="ambient-innovation",
17
+ authors=[
18
+ PackageAuthor(
19
+ name="Ambient Digital",
20
+ email="hello@ambient.digital",
21
+ ),
22
+ ],
23
+ maintainer=PackageMaintainer(name="Ambient Digital", url="https://ambient.digital/", email="hello@ambient.digital"),
24
+ licenser="Ambient Innovation: GmbH",
25
+ license=LICENSE_MIT,
26
+ license_year=2025,
27
+ development_status=DEPLOYMENT_STATUS_BETA,
28
+ has_migrations=False,
29
+ main_branch="main",
30
+ readme_content=ReadmeContent(uses_internationalisation=True),
31
+ dependencies=[
32
+ f"Django>={SUPPORTED_DJANGO_VERSIONS[0]}",
33
+ ],
34
+ supported_django_versions=SUPPORTED_DJANGO_VERSIONS,
35
+ supported_python_versions=[
36
+ "3.10",
37
+ "3.11",
38
+ "3.12",
39
+ "3.13",
40
+ ],
41
+ optional_dependencies={
42
+ "dev": [
43
+ *DEV_DEPENDENCIES,
44
+ ],
45
+ },
46
+ ruff_ignore_list=[
47
+ RuffIgnoredInspection(key="TD002", comment="Missing author in TODO"),
48
+ RuffIgnoredInspection(key="TD003", comment="Missing issue link on the line following this TODO"),
49
+ ],
50
+ )
@@ -0,0 +1,7 @@
1
+ ## Features
2
+
3
+ * Split up your business logic in commands and events
4
+ * Commands are imperatives telling your system what to do, events reflect that something has happened
5
+ * Register light-weight functions via a decorator to listen to your commands and events
6
+ * Message handlers receive the context of the message (command or event), providing an explicit API
7
+ * No magic, no side effects since the queue works synchronously
@@ -0,0 +1 @@
1
+ A simple message queue for commands and events (CQRS) for Django.
@@ -0,0 +1,17 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{py,rst,ini}]
12
+ indent_style = space
13
+ indent_size = 4
14
+
15
+ [*.yml]
16
+ indent_style = space
17
+ indent_size = 2
@@ -0,0 +1,92 @@
1
+ name: Unit tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ linting:
11
+ runs-on: ubuntu-24.04
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python 3.12
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+
20
+ - name: Install required packages
21
+ run: pip install pre-commit
22
+
23
+ - name: Run pre-commit hooks
24
+ run: pre-commit run --all-files --hook-stage push
25
+
26
+
27
+ tests:
28
+ name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
29
+ runs-on: ubuntu-24.04
30
+ strategy:
31
+ matrix:
32
+ python-version: ['3.10', '3.11', '3.12', '3.13', ]
33
+ django-version: ['42', '50', '51', ]
34
+
35
+ exclude:
36
+ - python-version: '3.9'
37
+ django-version: 50
38
+ - python-version: '3.9'
39
+ django-version: 51
40
+ - python-version: "3.13"
41
+ django-version: 42
42
+ - python-version: "3.13"
43
+ django-version: 50
44
+
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ - name: setup python
48
+ uses: actions/setup-python@v5
49
+ with:
50
+ python-version: ${{ matrix.python-version }}
51
+ - name: Install tox
52
+ run: pip install tox
53
+ - name: Run Tests
54
+ env:
55
+ TOXENV: django${{ matrix.django-version }}
56
+ run: tox
57
+ - name: Upload coverage data
58
+ uses: actions/upload-artifact@v4
59
+ with:
60
+ name: coverage-data-${{ matrix.python-version }}-${{ matrix.django-version }}
61
+ path: '${{ github.workspace }}/.coverage.*'
62
+ include-hidden-files: true
63
+ if-no-files-found: error
64
+
65
+ coverage:
66
+ name: Coverage
67
+ runs-on: ubuntu-24.04
68
+ needs: tests
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+
72
+ - uses: actions/setup-python@v5
73
+ with:
74
+ python-version: '3.12'
75
+
76
+ - name: Install dependencies
77
+ run: python -m pip install --upgrade coverage[toml]
78
+
79
+ - name: Download data
80
+ uses: actions/download-artifact@v4
81
+ with:
82
+ path: ${{ github.workspace }}
83
+ pattern: coverage-data-*
84
+ merge-multiple: true
85
+
86
+ - name: Combine coverage and fail if it's <100.0%
87
+ run: |
88
+ python -m coverage combine
89
+ python -m coverage html --skip-covered --skip-empty
90
+ python -m coverage report --fail-under=100.0
91
+ echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
92
+ python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,160 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pdm
86
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
87
+ #pdm.lock
88
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
89
+ # in version control.
90
+ # https://pdm.fming.dev/#use-with-ide
91
+ .pdm.toml
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # pytype static type analyzer
131
+ .pytype/
132
+
133
+ # Cython debug symbols
134
+ cython_debug/
135
+
136
+ # PyCharm
137
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
138
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
139
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
140
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
141
+ .idea/
142
+
143
+ # Requirements.txt is managed by pip-tools
144
+ requirements.txt
145
+
146
+ # sphinx build folder
147
+ _build
148
+
149
+ # Compiled source #
150
+ ###################
151
+ *.com
152
+ *.class
153
+ *.dll
154
+ *.exe
155
+ *.o
156
+
157
+ # Test databases
158
+ *.sqlite
159
+
160
+
@@ -0,0 +1,54 @@
1
+ # you find the full pre-commit-tools docu under:
2
+ # https://pre-commit.com/
3
+
4
+ repos:
5
+ - repo: https://github.com/astral-sh/ruff-pre-commit
6
+ rev: v0.9.3
7
+ hooks:
8
+ # Run the Ruff formatter.
9
+ - id: ruff-format
10
+ # Run the Ruff linter.
11
+ - id: ruff
12
+ args: [--fix, --exit-non-zero-on-fix]
13
+
14
+ - repo: https://github.com/adamchainz/blacken-docs
15
+ rev: 1.19.1
16
+ hooks:
17
+ - id: blacken-docs
18
+ additional_dependencies:
19
+ - black==24.10.0
20
+ files: '(?:README\.md|\.ambient-package-update\/templates\/snippets\/.*\.tpl|docs\/.*\.(?:md|rst))'
21
+
22
+ - repo: https://github.com/asottile/pyupgrade
23
+ rev: v3.19.1
24
+ hooks:
25
+ - id: pyupgrade
26
+ args: [ --py310-plus ]
27
+
28
+ - repo: https://github.com/adamchainz/django-upgrade
29
+ rev: 1.22.2
30
+ hooks:
31
+ - id: django-upgrade
32
+ args: [--target-version, "4.2"]
33
+
34
+ - repo: https://github.com/adamchainz/djade-pre-commit
35
+ rev: 1.3.2
36
+ hooks:
37
+ - id: djade
38
+ args: [--target-version, "4.2"]
39
+ exclude: |
40
+ (?x)^(
41
+ charts/.*
42
+ |.*\.py
43
+ )$
44
+
45
+ - repo: https://github.com/pre-commit/pre-commit-hooks
46
+ rev: v5.0.0
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 ]
@@ -0,0 +1,31 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-24.04
11
+ tools:
12
+ python: "3.12"
13
+
14
+ # Build documentation in the "docs/" directory with Sphinx
15
+ sphinx:
16
+ configuration: docs/conf.py
17
+
18
+ # Optionally build your docs in additional formats such as PDF and ePub
19
+ # formats:
20
+ # - pdf
21
+ # - epub
22
+
23
+ # Optional but recommended, declare the Python requirements required
24
+ # to build your documentation
25
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
26
+ python:
27
+ install:
28
+ - method: pip
29
+ path: .
30
+ extra_requirements:
31
+ - dev
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+
3
+ * *0.1.0* (2025-01-29)
4
+ * Project init
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ambient Digital
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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ambient Innovation: GmbH
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.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE.md
3
+ recursive-exclude * *.pyc
4
+ recursive-include django_queuebie *.py *.html *.js *.cfg *.mo *.po
@@ -0,0 +1,205 @@
1
+ Metadata-Version: 2.3
2
+ Name: django-queuebie
3
+ Version: 0.1.0
4
+ Summary: Simple message queue for commands and events (CQRS)
5
+ Author-email: Ambient Digital <hello@ambient.digital>
6
+ Description-Content-Type: text/markdown
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Environment :: Web Environment
9
+ Classifier: Framework :: Django
10
+ Classifier: Framework :: Django :: 4.2
11
+ Classifier: Framework :: Django :: 5.0
12
+ Classifier: Framework :: Django :: 5.1
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Natural Language :: English
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ 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
44
+
45
+ [![PyPI release](https://img.shields.io/pypi/v/django-queuebie.svg)](https://pypi.org/project/django-queuebie/)
46
+ [![Downloads](https://static.pepy.tech/badge/django-queuebie)](https://pepy.tech/project/django-queuebie)
47
+ [![Coverage](https://img.shields.io/badge/Coverage-100.0%25-success)](https://github.com/ambient-innovation/django-queuebie/actions?workflow=CI)
48
+ [![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)
49
+ [![Coding Style](https://img.shields.io/badge/code%20style-Ruff-000000.svg)](https://github.com/astral-sh/ruff)
50
+ [![Documentation Status](https://readthedocs.org/projects/django-queuebie/badge/?version=latest)](https://django-queuebie.readthedocs.io/en/latest/?badge=latest)
51
+
52
+ A simple message queue for commands and events (CQRS) for Django.
53
+
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/)
58
+
59
+
60
+ ## Features
61
+
62
+ * Split up your business logic in commands and events
63
+ * Commands are imperatives telling your system what to do, events reflect that something has happened
64
+ * Register light-weight functions via a decorator to listen to your commands and events
65
+ * Message handlers receive the context of the message (command or event), providing an explicit API
66
+ * No magic, no side effects since the queue works synchronously
67
+
68
+ ## Installation
69
+
70
+ - Install the package via pip:
71
+
72
+ `pip install django_queuebie`
73
+
74
+ or via pipenv:
75
+
76
+ `pipenv install 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
+
88
+
89
+ ## Contribute
90
+
91
+ ### Setup package for development
92
+
93
+ - Create a Python virtualenv and activate it
94
+ - Install "pip-tools" with `pip install -U pip-tools`
95
+ - Compile the requirements with `pip-compile --extra dev, -o requirements.txt pyproject.toml --resolver=backtracking`
96
+ - Sync the dependencies with your virtualenv with `pip-sync`
97
+
98
+ ### Add functionality
99
+
100
+ - Create a new branch for your feature
101
+ - Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
102
+ `-e /Users/workspace/django-queuebie` or via pip `pip install -e /Users/workspace/django-queuebie`
103
+ - Ensure the code passes the tests
104
+ - Create a pull request
105
+
106
+ ### Run tests
107
+
108
+ - Run tests
109
+ ````
110
+ pytest --ds settings tests
111
+ ````
112
+
113
+ - Check coverage
114
+ ````
115
+ coverage run -m pytest --ds settings tests
116
+ coverage report -m
117
+ ````
118
+
119
+ ### Git hooks (via pre-commit)
120
+
121
+ We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
122
+ vain.
123
+
124
+ To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
125
+
126
+ pre-commit install -t pre-push -t pre-commit --install-hooks
127
+
128
+ This will permanently install the git hooks for both, frontend and backend, in your local
129
+ [`.git/hooks`](./.git/hooks) folder.
130
+ The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
131
+
132
+ You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
133
+
134
+ pre-commit run [hook-id] [options]
135
+
136
+ Example: run single hook
137
+
138
+ pre-commit run ruff --all-files
139
+
140
+ Example: run all hooks of pre-push stage
141
+
142
+ pre-commit run --all-files --hook-stage push
143
+
144
+ ### Update documentation
145
+
146
+ - To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
147
+ - Open `docs/_build/html/index.html` to see the documentation.
148
+
149
+
150
+ ### Translation files
151
+
152
+ If you have added custom text, make sure to wrap it in `_()` where `_` is
153
+ gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
154
+
155
+ How to create translation file:
156
+
157
+ * Navigate to `django-queuebie`
158
+ * `python manage.py makemessages -l de`
159
+ * Have a look at the new/changed files within `queuebie/locale`
160
+
161
+ How to compile translation files:
162
+
163
+ * Navigate to `django-queuebie`
164
+ * `python manage.py compilemessages`
165
+ * Have a look at the new/changed files within `queuebie/locale`
166
+
167
+
168
+ ### Publish to ReadTheDocs.io
169
+
170
+ - Fetch the latest changes in GitHub mirror and push them
171
+ - Trigger new build at ReadTheDocs.io (follow instructions in admin panel at RTD) if the GitHub webhook is not yet set
172
+ up.
173
+
174
+ ### Publish to PyPi
175
+
176
+ - Update documentation about new/changed functionality
177
+
178
+ - Update the `Changelog`
179
+
180
+ - Increment version in main `__init__.py`
181
+
182
+ - Create pull request / merge to main
183
+
184
+ - This project uses the flit package to publish to PyPI. Thus, publishing should be as easy as running:
185
+ ```
186
+ flit publish
187
+ ```
188
+
189
+ To publish to TestPyPI use the following to ensure that you have set up your .pypirc as
190
+ shown [here](https://flit.readthedocs.io/en/latest/upload.html#using-pypirc) and use the following command:
191
+
192
+ ```
193
+ flit publish --repository testpypi
194
+ ```
195
+
196
+ ### Maintenance
197
+
198
+ Please note that this package supports the [ambient-package-update](https://pypi.org/project/ambient-package-update/).
199
+ So you don't have to worry about the maintenance of this package. This updater is rendering all important
200
+ configuration and setup files. It works similar to well-known updaters like `pyupgrade` or `django-upgrade`.
201
+
202
+ To run an update, refer to the [documentation page](https://pypi.org/project/ambient-package-update/)
203
+ of the "ambient-package-update".
204
+
205
+