django-systemd 0.2.0__tar.gz → 0.2.2__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 (78) hide show
  1. {django_systemd-0.2.0 → django_systemd-0.2.2}/PKG-INFO +9 -16
  2. {django_systemd-0.2.0 → django_systemd-0.2.2}/README.md +5 -10
  3. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/changelog.rst +14 -0
  4. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/conf.py +37 -28
  5. django_systemd-0.2.2/doc/source/index.rst +88 -0
  6. {django_systemd-0.2.0 → django_systemd-0.2.2}/pyproject.toml +5 -9
  7. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/__init__.py +1 -1
  8. {django_systemd-0.2.0 → django_systemd-0.2.2}/uv.lock +257 -264
  9. django_systemd-0.2.0/doc/source/index.rst +0 -20
  10. {django_systemd-0.2.0 → django_systemd-0.2.2}/.codecov.yml +0 -0
  11. {django_systemd-0.2.0 → django_systemd-0.2.2}/.gitattributes +0 -0
  12. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/CODEOWNERS +0 -0
  13. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/dependabot.yml +0 -0
  14. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/bandit.yml +0 -0
  15. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/dependabot-automerge.yml +0 -0
  16. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/lint.yml +0 -0
  17. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/release.yml +0 -0
  18. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/scorecard.yml +0 -0
  19. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/test.yml +0 -0
  20. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/update_coc.yml +0 -0
  21. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/workflows/zizmor.yml +0 -0
  22. {django_systemd-0.2.0 → django_systemd-0.2.2}/.github/zizmor.yml +0 -0
  23. {django_systemd-0.2.0 → django_systemd-0.2.2}/.gitignore +0 -0
  24. {django_systemd-0.2.0 → django_systemd-0.2.2}/.pre-commit-config.yaml +0 -0
  25. {django_systemd-0.2.0 → django_systemd-0.2.2}/.readthedocs.yaml +0 -0
  26. {django_systemd-0.2.0 → django_systemd-0.2.2}/AGENTS.md +0 -0
  27. {django_systemd-0.2.0 → django_systemd-0.2.2}/CODE_OF_CONDUCT.md +0 -0
  28. {django_systemd-0.2.0 → django_systemd-0.2.2}/CONTRIBUTING.md +0 -0
  29. {django_systemd-0.2.0 → django_systemd-0.2.2}/LICENSE +0 -0
  30. {django_systemd-0.2.0 → django_systemd-0.2.2}/SECURITY.md +0 -0
  31. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/_static/style.css +0 -0
  32. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/command.rst +0 -0
  33. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/howto.rst +0 -0
  34. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/config.rst +0 -0
  35. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/defines.rst +0 -0
  36. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/index.rst +0 -0
  37. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/protocol.rst +0 -0
  38. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/signals.rst +0 -0
  39. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/reference/systemd.rst +0 -0
  40. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/refs.rst +0 -0
  41. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/settings.rst +0 -0
  42. {django_systemd-0.2.0 → django_systemd-0.2.2}/doc/source/tutorial.rst +0 -0
  43. {django_systemd-0.2.0 → django_systemd-0.2.2}/justfile +0 -0
  44. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/admin.py +0 -0
  45. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/apps.py +0 -0
  46. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/config.py +0 -0
  47. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/defines.py +0 -0
  48. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/management/__init__.py +0 -0
  49. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/management/commands/__init__.py +0 -0
  50. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/management/commands/systemd.py +0 -0
  51. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/protocol.py +0 -0
  52. {django_systemd-0.2.0 → django_systemd-0.2.2}/src/django_systemd/signals.py +0 -0
  53. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/__init__.py +0 -0
  54. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/__init__.py +0 -0
  55. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app1/__init__.py +0 -0
  56. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app1/systemd/app@.target +0 -0
  57. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app1/systemd/check.timer +0 -0
  58. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app1/systemd/web.service +0 -0
  59. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app2/__init__.py +0 -0
  60. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app2/systemd/app@.target +0 -0
  61. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app2/systemd/check.timer +0 -0
  62. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app2/systemd/web.service +0 -0
  63. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/__init__.py +0 -0
  64. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/bad name.service +0 -0
  65. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/broken.service +0 -0
  66. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/cleanup.service +0 -0
  67. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/cleanup.timer +0 -0
  68. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/my.app.timer +0 -0
  69. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/runtime.service +0 -0
  70. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/scoped.service +0 -0
  71. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/sub/web.service +0 -0
  72. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/apps/app3/systemd/web.socket +0 -0
  73. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/conftest.py +0 -0
  74. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/settings.py +0 -0
  75. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/test_basics.py +0 -0
  76. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/test_command.py +0 -0
  77. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/test_protocol.py +0 -0
  78. {django_systemd-0.2.0 → django_systemd-0.2.2}/tests/urls.py +0 -0
@@ -1,17 +1,17 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: django-systemd
3
- Version: 0.2.0
4
- Summary: Let your Django apps manage your systemd unit files and services!
3
+ Version: 0.2.2
4
+ Summary: Ship renderable systemd unit templates with your apps and manage project services through the django admin.
5
5
  Project-URL: Homepage, https://django-systemd.readthedocs.io
6
6
  Project-URL: Documentation, https://django-systemd.readthedocs.io
7
7
  Project-URL: Repository, https://github.com/bckohan/django-systemd
8
8
  Project-URL: Issues, https://github.com/bckohan/django-systemd/issues
9
9
  Project-URL: Changelog, https://django-systemd.readthedocs.io/en/stable/changelog.html
10
- Project-URL: Code_of_Conduct, https://github.com/bckohan/membership/blob/main/CODE_OF_CONDUCT.md
10
+ Project-URL: Code_of_Conduct, https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md
11
11
  Author-email: Brian Kohan <bckohan@gmail.com>
12
12
  License-Expression: MIT
13
13
  License-File: LICENSE
14
- Keywords: CLI,Typer,commands,django,integration,management,services,systemd
14
+ Keywords: CLI,Typer,commands,devops,django,integration,management,services,systemctl,systemd
15
15
  Classifier: Development Status :: 5 - Production/Stable
16
16
  Classifier: Environment :: Console
17
17
  Classifier: Framework :: Django
@@ -36,8 +36,6 @@ Requires-Python: <4.0,>=3.11
36
36
  Requires-Dist: django-render-static>=3.5.0
37
37
  Requires-Dist: django-typer>=3.5.1
38
38
  Requires-Dist: django<6.2,>=5.2
39
- Provides-Extra: rich
40
- Requires-Dist: rich<16.0.0,>=10.11.0; extra == 'rich'
41
39
  Description-Content-Type: text/markdown
42
40
 
43
41
  # django-systemd
@@ -53,18 +51,13 @@ Description-Content-Type: text/markdown
53
51
  [![Test Status](https://github.com/bckohan/django-systemd/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bckohan/django-systemd/actions/workflows/test.yml?query=branch:main)
54
52
  [![Lint Status](https://github.com/bckohan/django-systemd/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bckohan/django-systemd/actions/workflows/lint.yml?query=branch:main)
55
53
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/bckohan/django-systemd/badge)](https://securityscorecards.dev/viewer/?uri=github.com/bckohan/django-systemd)
54
+ [![Published on Django Packages](https://img.shields.io/badge/Published%20on-Django%20Packages-0c3c26)](https://djangopackages.org/packages/p/django-typer/)
55
+
56
56
 
57
- `django-systemd` does two independent things for a Django deployment:
57
+ [django-systemd](https://pypi.org/project/django-systemd) does two independent things for a Django deployment:
58
58
 
59
- 1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/`
60
- directory. Render them at package time with known settings and commit the
61
- result, or render them at deploy time from live production settings.
62
- 2. **Manage the project's units.** `django-admin systemd` can list, install,
63
- update, restart and reload every unit the project defines, without you
64
- naming them. Units are managed in the system scope by default; privileges
65
- come from root, an explicit escalation prefix, or polkit with the link
66
- install method. The user scope, with nothing running as root, is still
67
- available.
59
+ 1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/` directory. Render them at package time with known settings and commit the result, or render them at deploy time from live production settings. This allows you to do things like ship services with your reusable Django app that downstream users can deploy from their own settings.
60
+ 2. **Manage the project's units.** `django-admin systemd` can list, install, update, restart and reload every unit the project defines, without you naming them. Units are managed in the system scope by default; privileges come from root, an explicit escalation prefix, or [polkit](https://github.com/polkit-org/polkit) with the link install method. The user scope, with nothing running as root, is still available.
68
61
 
69
62
  ```bash
70
63
  django-admin systemd list
@@ -11,18 +11,13 @@
11
11
  [![Test Status](https://github.com/bckohan/django-systemd/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bckohan/django-systemd/actions/workflows/test.yml?query=branch:main)
12
12
  [![Lint Status](https://github.com/bckohan/django-systemd/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bckohan/django-systemd/actions/workflows/lint.yml?query=branch:main)
13
13
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/bckohan/django-systemd/badge)](https://securityscorecards.dev/viewer/?uri=github.com/bckohan/django-systemd)
14
+ [![Published on Django Packages](https://img.shields.io/badge/Published%20on-Django%20Packages-0c3c26)](https://djangopackages.org/packages/p/django-typer/)
15
+
14
16
 
15
- `django-systemd` does two independent things for a Django deployment:
17
+ [django-systemd](https://pypi.org/project/django-systemd) does two independent things for a Django deployment:
16
18
 
17
- 1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/`
18
- directory. Render them at package time with known settings and commit the
19
- result, or render them at deploy time from live production settings.
20
- 2. **Manage the project's units.** `django-admin systemd` can list, install,
21
- update, restart and reload every unit the project defines, without you
22
- naming them. Units are managed in the system scope by default; privileges
23
- come from root, an explicit escalation prefix, or polkit with the link
24
- install method. The user scope, with nothing running as root, is still
25
- available.
19
+ 1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/` directory. Render them at package time with known settings and commit the result, or render them at deploy time from live production settings. This allows you to do things like ship services with your reusable Django app that downstream users can deploy from their own settings.
20
+ 2. **Manage the project's units.** `django-admin systemd` can list, install, update, restart and reload every unit the project defines, without you naming them. Units are managed in the system scope by default; privileges come from root, an explicit escalation prefix, or [polkit](https://github.com/polkit-org/polkit) with the link install method. The user scope, with nothing running as root, is still available.
26
21
 
27
22
  ```bash
28
23
  django-admin systemd list
@@ -4,6 +4,20 @@
4
4
  Change Log
5
5
  ==========
6
6
 
7
+ v0.2.2 (2026-09-30)
8
+ ===================
9
+
10
+ * Fixed CoC link.
11
+ * Updated description.
12
+ * Drop rich optional dep as it is automatically included with typer now.
13
+
14
+
15
+ v0.2.1 (2026-09-29)
16
+ ===================
17
+
18
+ * Doc updates.
19
+
20
+
7
21
  v0.2.0 (2026-09-29)
8
22
  ===================
9
23
 
@@ -1,18 +1,17 @@
1
- from datetime import datetime
2
- import sys
3
1
  import os
4
- from pathlib import Path
5
- from sphinx.ext.autodoc import between
6
2
  import shutil
3
+ import sys
4
+ from pathlib import Path
5
+
7
6
  import django
8
- from django.conf import settings
7
+ from sphinx.ext.autodoc import between
9
8
 
10
9
  sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src"))
11
10
  sys.path.append(str(Path(__file__).parent.parent.parent))
12
- sys.path.append(str(Path(__file__).parent / 'ext'))
11
+ sys.path.append(str(Path(__file__).parent / "ext"))
13
12
 
14
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')
15
- #settings.configure()
13
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
14
+ # settings.configure()
16
15
  django.setup()
17
16
 
18
17
  import django_systemd
@@ -47,13 +46,13 @@ release = django_systemd.__version__
47
46
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
48
47
  # ones.
49
48
  extensions = [
50
- 'sphinxcontrib_django',
51
- 'sphinx.ext.autodoc',
52
- 'sphinx.ext.todo',
53
- 'sphinxcontrib.typer',
54
- 'sphinx_tabs.tabs',
49
+ "sphinxcontrib_django",
50
+ "sphinx.ext.autodoc",
51
+ "sphinx.ext.todo",
52
+ "sphinxcontrib.typer",
53
+ "sphinx_tabs.tabs",
55
54
  "sphinx.ext.viewcode",
56
- 'sphinx.ext.intersphinx',
55
+ "sphinx.ext.intersphinx",
57
56
  "sphinx.ext.autosectionlabel",
58
57
  "sphinxcontrib_enum",
59
58
  ]
@@ -71,7 +70,7 @@ autodoc_use_legacy_class_based = True
71
70
  svg2pdf_converter = ("cairosvg",)
72
71
 
73
72
  # Add any paths that contain templates here, relative to this directory.
74
- templates_path = ['_templates']
73
+ templates_path = ["_templates"]
75
74
 
76
75
  # List of patterns, relative to source directory, that match files and
77
76
  # directories to ignore when looking for source files.
@@ -84,7 +83,7 @@ exclude_patterns = []
84
83
  # a list of builtin themes.
85
84
  #
86
85
  # html_theme = 'sphinx_rtd_theme'
87
- html_theme = 'furo'
86
+ html_theme = "furo"
88
87
  html_theme_options = {
89
88
  "source_repository": "https://github.com/bckohan/django-systemd/",
90
89
  "source_branch": "main",
@@ -95,17 +94,17 @@ html_title = f"{project} {release}"
95
94
  # Add any paths that contain custom static files (such as style sheets) here,
96
95
  # relative to this directory. They are copied after the builtin static files,
97
96
  # so a file named "default.css" will overwrite the builtin "default.css".
98
- html_static_path = ['_static']
99
- html_css_files = ['style.css']
97
+ html_static_path = ["_static"]
98
+ html_css_files = ["style.css"]
100
99
 
101
100
  todo_include_todos = True
102
101
 
103
102
  latex_engine = "xelatex"
104
103
 
105
- suppress_warnings = ['app.add_directive']
104
+ suppress_warnings = ["app.add_directive"]
106
105
 
107
106
  linkcheck_ignore = [
108
- r'https://github.com/django/django/blob/main/django/core/management/__init__.py#L278', # Ignore exact match
107
+ r"https://github.com/django/django/blob/main/django/core/management/__init__.py#L278", # Ignore exact match
109
108
  ]
110
109
 
111
110
  linkcheck_allow_redirects = True
@@ -121,29 +120,39 @@ intersphinx_mapping = {
121
120
  "click": ("https://click.palletsprojects.com/en/stable", None),
122
121
  "rich": ("https://rich.readthedocs.io/en/stable", None),
123
122
  "django-typer": ("https://django-typer.readthedocs.io/en/stable", None),
124
- "django-render-static": ("https://django-render-static.readthedocs.io/en/stable", None),
125
- "python": ('https://docs.python.org/3', None)
123
+ "django-render-static": (
124
+ "https://django-render-static.readthedocs.io/en/stable",
125
+ None,
126
+ ),
127
+ "python": ("https://docs.python.org/3", None),
126
128
  }
127
129
 
128
130
 
129
- def pypi_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
131
+ def pypi_role(name, rawtext, text, lineno, inliner, options=None, content=None):
130
132
  from docutils import nodes
131
133
 
132
134
  url = f"https://pypi.org/project/{text}/"
133
- node = nodes.reference(rawtext, text, refuri=url, **options)
135
+ node = nodes.reference(rawtext, text, refuri=url, **(options or {}))
136
+ return [node], []
137
+
138
+
139
+ def rtd_role(name, rawtext, text, lineno, inliner, options=None, content=None):
140
+ from docutils import nodes
141
+
142
+ url = f"https://{text}.readthedocs.io"
143
+ node = nodes.reference(rawtext, text, refuri=url, **(options or {}))
134
144
  return [node], []
135
145
 
136
146
 
137
147
  def setup(app):
138
148
  from docutils.parsers.rst import roles
149
+
139
150
  # Register a sphinx.ext.autodoc.between listener to ignore everything
140
151
  # between lines that contain the word IGNORE
141
- app.connect(
142
- 'autodoc-process-docstring',
143
- between('^.*[*]{79}.*$', exclude=True)
144
- )
152
+ app.connect("autodoc-process-docstring", between("^.*[*]{79}.*$", exclude=True))
145
153
  # app.connect('html-page-context', add_page_class)
146
154
  roles.register_local_role("pypi", pypi_role)
155
+ roles.register_local_role("rtd", rtd_role)
147
156
  app.add_crossref_type(directivename="django-admin", rolename="django-admin")
148
157
  # https://sphinxcontrib-typer.readthedocs.io/en/latest/howto.html#build-to-multiple-formats
149
158
  if Path(app.doctreedir).exists():
@@ -0,0 +1,88 @@
1
+ .. include:: ./refs.rst
2
+ .. role:: big
3
+
4
+ ==============
5
+ Django Systemd
6
+ ==============
7
+
8
+ .. image:: https://img.shields.io/badge/License-MIT-blue.svg
9
+ :target: https://opensource.org/licenses/MIT
10
+ :alt: License: MIT
11
+
12
+ .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
13
+ :target: https://github.com/astral-sh/ruff
14
+ :alt: Ruff
15
+
16
+ .. image:: https://badge.fury.io/py/django-systemd.svg
17
+ :target: https://pypi.python.org/pypi/django-systemd/
18
+ :alt: PyPI version
19
+
20
+ .. image:: https://img.shields.io/pypi/pyversions/django-systemd.svg
21
+ :target: https://pypi.python.org/pypi/django-systemd/
22
+ :alt: PyPI pyversions
23
+
24
+ .. image:: https://img.shields.io/pypi/djversions/django-systemd.svg
25
+ :target: https://pypi.org/project/django-systemd/
26
+ :alt: PyPI djversions
27
+
28
+ .. image:: https://img.shields.io/pypi/status/django-systemd.svg
29
+ :target: https://pypi.python.org/pypi/django-systemd
30
+ :alt: PyPI status
31
+
32
+ .. image:: https://readthedocs.org/projects/django-systemd/badge/?version=latest
33
+ :target: https://django-systemd.readthedocs.io/?badge=latest
34
+ :alt: Documentation Status
35
+
36
+ .. image:: https://codecov.io/gh/bckohan/django-systemd/branch/main/graph/badge.svg
37
+ :target: https://codecov.io/gh/bckohan/django-systemd
38
+ :alt: Code Cov
39
+
40
+ .. image:: https://github.com/bckohan/django-systemd/actions/workflows/test.yml/badge.svg?branch=main
41
+ :target: https://github.com/bckohan/django-systemd/actions/workflows/test.yml?query=branch:main
42
+ :alt: Test Status
43
+
44
+ .. image:: https://github.com/bckohan/django-systemd/actions/workflows/lint.yml/badge.svg?branch=main
45
+ :target: https://github.com/bckohan/django-systemd/actions/workflows/lint.yml?query=branch:main
46
+ :alt: Lint Status
47
+
48
+ .. image:: https://api.securityscorecards.dev/projects/github.com/bckohan/django-systemd/badge
49
+ :target: https://securityscorecards.dev/viewer/?uri=github.com/bckohan/django-systemd
50
+ :alt: OpenSSF Scorecard
51
+
52
+ .. image:: https://img.shields.io/badge/Published%20on-Django%20Packages-0c3c26
53
+ :target: https://djangopackages.org/packages/p/django-systemd/
54
+ :alt: Published on Django Packages
55
+
56
+ :pypi:`django-systemd` does two independent things for a Django deployment:
57
+
58
+ 1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/`
59
+ directory. Render them at package time with known settings and commit the
60
+ result, or render them at deploy time from live production settings. This
61
+ allows you to do things like ship services with your reusable Django app
62
+ that downstream users can deploy from their own settings.
63
+ 2. **Manage the project's units.** :django-admin:`systemd` can list, install,
64
+ update, restart and reload every unit the project defines, without you
65
+ naming them. Units are managed in the system scope by default; privileges
66
+ come from root, an explicit escalation prefix, or
67
+ `polkit <https://github.com/polkit-org/polkit>`_ with the link install
68
+ method. The user scope, with nothing running as root, is still available.
69
+
70
+ .. code-block:: bash
71
+
72
+ django-admin systemd list
73
+ django-admin systemd render ./units --context venv=/srv/app/.venv # in CI
74
+ django-admin systemd install --enable # on the host
75
+ django-admin systemd reload # on the host
76
+
77
+ |
78
+
79
+ .. toctree::
80
+ :maxdepth: 2
81
+ :caption: Contents:
82
+
83
+ tutorial
84
+ howto
85
+ command
86
+ settings
87
+ reference/index
88
+ changelog
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "django-systemd"
7
- version = "0.2.0"
8
- description = "Let your Django apps manage your systemd unit files and services!"
7
+ version = "0.2.2"
8
+ description = "Ship renderable systemd unit templates with your apps and manage project services through the django admin."
9
9
  requires-python = ">=3.11,<4.0"
10
10
  authors = [
11
11
  {name = "Brian Kohan", email = "bckohan@gmail.com"},
@@ -15,7 +15,7 @@ license-files = [ "LICENSE" ]
15
15
  readme = "README.md"
16
16
  repository = "https://github.com/bckohan/django-systemd"
17
17
  homepage = "https://django-systemd.readthedocs.io"
18
- keywords = ["django", "CLI", "management", "Typer", "commands", "systemd", "services", "integration"]
18
+ keywords = ["django", "CLI", "management", "Typer", "commands", "systemd", "services", "integration", "systemctl", "devops"]
19
19
  dependencies = [
20
20
  "Django>=5.2,<6.2",
21
21
  "django-render-static>=3.5.0",
@@ -57,10 +57,6 @@ conflicts = [
57
57
  [tool.hatch.build.targets.wheel]
58
58
  packages = ["src/django_systemd"]
59
59
 
60
- [project.optional-dependencies]
61
- rich = [
62
- "rich>=10.11.0,<16.0.0",
63
- ]
64
60
 
65
61
  [project.urls]
66
62
  "Homepage" = "https://django-systemd.readthedocs.io"
@@ -68,7 +64,7 @@ rich = [
68
64
  "Repository" = "https://github.com/bckohan/django-systemd"
69
65
  "Issues" = "https://github.com/bckohan/django-systemd/issues"
70
66
  "Changelog" = "https://django-systemd.readthedocs.io/en/stable/changelog.html"
71
- "Code_of_Conduct" = "https://github.com/bckohan/membership/blob/main/CODE_OF_CONDUCT.md"
67
+ "Code_of_Conduct" = "https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md"
72
68
 
73
69
 
74
70
  [tool.mypy]
@@ -156,11 +152,11 @@ include = [
156
152
  line-length = 88
157
153
  target-version = "py311"
158
154
  exclude = [
159
- "doc",
160
155
  "dist",
161
156
  "examples",
162
157
  "docs",
163
158
  ]
159
+ extend-exclude = ["*.md", "*.rst"]
164
160
 
165
161
  [tool.ruff.lint]
166
162
  exclude = [
@@ -17,7 +17,7 @@ r"""
17
17
 
18
18
  """
19
19
 
20
- VERSION = (0, 2, 0)
20
+ VERSION = (0, 2, 2)
21
21
 
22
22
  __title__ = "django-systemd"
23
23
  __version__ = ".".join(str(i) for i in VERSION)