Skip to main content

Installation

$ [sudo] pip install django-launchd

settings.py

INSTALLED_APPS = [
    "django_launchd",
]

Models

model __doc__
django_launchd.models.Plist launchd.plist model. fields: path
django_launchd.models.Lock launchd.plist Lock class. fields: plist (ForeignKey), key

Examples

init

import django_launchd
from django_launchd.models import Plist

files = django_launchd.files("~/Library/LaunchAgents")
for f in files:
    Plist.objects.get_or_create(path=f)
Plist.objects.exclude(path__in=files).delete()

locks

for agent in filter(lambda a: a.exists, Plist.objects.all()):
    if <condition>:
        agent.lock("key")
    else:
        agent.unlock("key")

load/unload

for agent in filter(lambda a: a.exists, Plist.objects.all()):
    if agent.locks:
        agent.unload()
    else:
        agent.load()

django-readme-generator

Metadata

Release files for django-launchd 2019.4.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-launchd 2019.4.13
File Size Uploaded
django-launchd-2019.4.13.tar.gz 2.9 kB Details

Release files / django-launchd-2019.4.13.tar.gz

Download URL django-launchd-2019.4.13.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
83f1c34d3e38cd114eb98d649dd0bdb4aa41ef32f2a5ef12e2f7ecd4d698b5a6
BLAKE2b-256 checksum
How to use checksums
294fa25f93fbdfa63b0fb8e6b5138d3cf5acd4241447361a4773787b5cb4f88e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

2019.4.13 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page