django-systemd 0.2.0__tar.gz → 0.2.1__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.
- {django_systemd-0.2.0 → django_systemd-0.2.1}/PKG-INFO +3 -10
- {django_systemd-0.2.0 → django_systemd-0.2.1}/README.md +2 -9
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/changelog.rst +6 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/conf.py +9 -0
- django_systemd-0.2.1/doc/source/index.rst +85 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/pyproject.toml +1 -1
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/__init__.py +1 -1
- {django_systemd-0.2.0 → django_systemd-0.2.1}/uv.lock +1 -1
- django_systemd-0.2.0/doc/source/index.rst +0 -20
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.codecov.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.gitattributes +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/CODEOWNERS +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/dependabot.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/bandit.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/dependabot-automerge.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/lint.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/release.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/scorecard.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/test.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/update_coc.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/workflows/zizmor.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.github/zizmor.yml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.gitignore +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.pre-commit-config.yaml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/.readthedocs.yaml +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/AGENTS.md +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/CODE_OF_CONDUCT.md +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/CONTRIBUTING.md +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/LICENSE +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/SECURITY.md +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/_static/style.css +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/command.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/howto.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/config.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/defines.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/index.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/protocol.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/signals.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/reference/systemd.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/refs.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/settings.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/doc/source/tutorial.rst +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/justfile +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/admin.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/apps.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/config.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/defines.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/management/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/management/commands/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/management/commands/systemd.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/protocol.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/signals.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app1/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app1/systemd/app@.target +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app1/systemd/check.timer +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app1/systemd/web.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app2/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app2/systemd/app@.target +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app2/systemd/check.timer +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app2/systemd/web.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/__init__.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/bad name.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/broken.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/cleanup.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/cleanup.timer +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/my.app.timer +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/runtime.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/scoped.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/sub/web.service +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/apps/app3/systemd/web.socket +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/conftest.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/settings.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/test_basics.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/test_command.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/test_protocol.py +0 -0
- {django_systemd-0.2.0 → django_systemd-0.2.1}/tests/urls.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: django-systemd
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Let your Django apps manage your systemd unit files and services!
|
|
5
5
|
Project-URL: Homepage, https://django-systemd.readthedocs.io
|
|
6
6
|
Project-URL: Documentation, https://django-systemd.readthedocs.io
|
|
@@ -56,15 +56,8 @@ Description-Content-Type: text/markdown
|
|
|
56
56
|
|
|
57
57
|
`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
|
-
|
|
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
|
|
@@ -14,15 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
`django-systemd` does two independent things for a Django deployment:
|
|
16
16
|
|
|
17
|
-
1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/`
|
|
18
|
-
|
|
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.
|
|
17
|
+
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.
|
|
18
|
+
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
19
|
|
|
27
20
|
```bash
|
|
28
21
|
django-admin systemd list
|
|
@@ -134,6 +134,14 @@ def pypi_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
|
|
134
134
|
return [node], []
|
|
135
135
|
|
|
136
136
|
|
|
137
|
+
def rtd_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
|
138
|
+
from docutils import nodes
|
|
139
|
+
|
|
140
|
+
url = f"https://{text}.readthedocs.io"
|
|
141
|
+
node = nodes.reference(rawtext, text, refuri=url, **options)
|
|
142
|
+
return [node], []
|
|
143
|
+
|
|
144
|
+
|
|
137
145
|
def setup(app):
|
|
138
146
|
from docutils.parsers.rst import roles
|
|
139
147
|
# Register a sphinx.ext.autodoc.between listener to ignore everything
|
|
@@ -144,6 +152,7 @@ def setup(app):
|
|
|
144
152
|
)
|
|
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,85 @@
|
|
|
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
|
+
|
|
53
|
+
:pypi:`django-systemd` does two independent things for a Django deployment:
|
|
54
|
+
|
|
55
|
+
1. **Generate systemd unit files.** Apps bundle unit templates in a `systemd/`
|
|
56
|
+
directory. Render them at package time with known settings and commit the
|
|
57
|
+
result, or render them at deploy time from live production settings. This
|
|
58
|
+
allows you to do things like ship services with your reusable Django app
|
|
59
|
+
that downstream users can deploy from their own settings.
|
|
60
|
+
2. **Manage the project's units.** :django-admin:`systemd` can list, install,
|
|
61
|
+
update, restart and reload every unit the project defines, without you
|
|
62
|
+
naming them. Units are managed in the system scope by default; privileges
|
|
63
|
+
come from root, an explicit escalation prefix, or
|
|
64
|
+
`polkit <https://github.com/polkit-org/polkit>`_ with the link install
|
|
65
|
+
method. The user scope, with nothing running as root, is still available.
|
|
66
|
+
|
|
67
|
+
.. code-block:: bash
|
|
68
|
+
|
|
69
|
+
django-admin systemd list
|
|
70
|
+
django-admin systemd render ./units --context venv=/srv/app/.venv # in CI
|
|
71
|
+
django-admin systemd install --enable # on the host
|
|
72
|
+
django-admin systemd reload # on the host
|
|
73
|
+
|
|
74
|
+
|
|
|
75
|
+
|
|
76
|
+
.. toctree::
|
|
77
|
+
:maxdepth: 2
|
|
78
|
+
:caption: Contents:
|
|
79
|
+
|
|
80
|
+
tutorial
|
|
81
|
+
howto
|
|
82
|
+
command
|
|
83
|
+
settings
|
|
84
|
+
reference/index
|
|
85
|
+
changelog
|
|
@@ -628,7 +628,7 @@ wheels = [
|
|
|
628
628
|
|
|
629
629
|
[[package]]
|
|
630
630
|
name = "django-systemd"
|
|
631
|
-
version = "0.2.
|
|
631
|
+
version = "0.2.1"
|
|
632
632
|
source = { editable = "." }
|
|
633
633
|
dependencies = [
|
|
634
634
|
{ name = "django", version = "5.2.17", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12' or extra == 'group-14-django-systemd-dj52'" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/management/commands/__init__.py
RENAMED
|
File without changes
|
{django_systemd-0.2.0 → django_systemd-0.2.1}/src/django_systemd/management/commands/systemd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|