Metadata-Version: 2.5
Name: django-systemd
Version: 0.2.0
Summary: Let your Django apps manage your systemd unit files and services!
Project-URL: Homepage, https://django-systemd.readthedocs.io
Project-URL: Documentation, https://django-systemd.readthedocs.io
Project-URL: Repository, https://github.com/bckohan/django-systemd
Project-URL: Issues, https://github.com/bckohan/django-systemd/issues
Project-URL: Changelog, https://django-systemd.readthedocs.io/en/stable/changelog.html
Project-URL: Code_of_Conduct, https://github.com/bckohan/membership/blob/main/CODE_OF_CONDUCT.md
Author-email: Brian Kohan <bckohan@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: CLI,Typer,commands,django,integration,management,services,systemd
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Django :: 6.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0,>=3.11
Requires-Dist: django-render-static>=3.5.0
Requires-Dist: django-typer>=3.5.1
Requires-Dist: django<6.2,>=5.2
Provides-Extra: rich
Requires-Dist: rich<16.0.0,>=10.11.0; extra == 'rich'
Description-Content-Type: text/markdown

# django-systemd

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![PyPI version](https://badge.fury.io/py/django-systemd.svg)](https://pypi.python.org/pypi/django-systemd/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/django-systemd.svg)](https://pypi.python.org/pypi/django-systemd/)
[![PyPI djversions](https://img.shields.io/pypi/djversions/django-systemd.svg)](https://pypi.org/project/django-systemd/)
[![PyPI status](https://img.shields.io/pypi/status/django-systemd.svg)](https://pypi.python.org/pypi/django-systemd)
[![Documentation Status](https://readthedocs.org/projects/django-systemd/badge/?version=latest)](http://django-systemd.readthedocs.io/?badge=latest/)
[![Code Cov](https://codecov.io/gh/bckohan/django-systemd/branch/main/graph/badge.svg)](https://codecov.io/gh/bckohan/django-systemd)
[![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)
[![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)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/bckohan/django-systemd/badge)](https://securityscorecards.dev/viewer/?uri=github.com/bckohan/django-systemd)

`django-systemd` does two independent things for a Django deployment:

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.
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 with the link
   install method. The user scope, with nothing running as root, is still
   available.

```bash
django-admin systemd list
django-admin systemd render ./units --context venv=/srv/app/.venv  # in CI
django-admin systemd install --enable  # on the host
django-admin systemd reload  # on the host
```

See the [documentation](https://django-systemd.readthedocs.io) for the how-to and settings.
