launchd.plist model
Project description
Installation
$ [sudo] pip install django-launchd
Classes
class | __doc__ |
---|---|
django_launchd.models.Lock |
launchd.plist Lock class. fields: plist (ForeignKey), key |
django_launchd.models.Plist |
launchd.plist model. fields: path |
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_launchd-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07de677fc553acd77a287efe4cf22f7f05f2cf96b9235b912a53ca3bc11c8ba3 |
|
MD5 | 2941321bf8d7602f34c0c2790dfb49e1 |
|
BLAKE2b-256 | 535c54cee2dd19865a5b0fe91ce94d9a3a4f16f7a2a2fcfb663e9b519cbd57f3 |