django-terminator
One-time execution of Django model methods, when model instance meets specific conditions.
Examples
import datetime
from django.db import models
from django.db.models import Q
from terminator import execute_once
class Message(models.Model):
sent = models.BooleanField(default=False)
sender_email = models.EmailField()
recipient_email = models.EmailField()
subject = models.CharField(max_length=128)
body = models.TextField()
@execute_once(Q())
def send(self):
# Some code which sends the email…
pass
class BirthdayGift(models.Model):
birthday_date = models.DateField()
@execute_once(lambda cls: Q(birthday_date__lte=datetime.date.today()))
def send(self):
# Some code which sends the gift…
pass
Later:
from terminator import terminate terminate()
For more extensive documentation, see the tests.
Metadata
Release files for django-terminator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-terminator-0.1.1.tar.gz | 4.5 kB | Without provenance | Details for django-terminator-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_terminator-0.1.1-py27-none-any.whl | Python 2.7 | none | any | Details for django_terminator-0.1.1-py27-none-any.whl |
Total release size: 11.2 kB
Release files / django-terminator-0.1.1.tar.gz
| Download URL | django-terminator-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cf1dec565a6070b310013a1de7ce3713af9b5f41ab1abe3b4296abec7a6ad06
|
|
BLAKE2b-256 checksum How to use checksums |
d08dcb67810f47efcad7b67f30a9ad77181b140ca1e24ea3161ca6690b2bb0bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_terminator-0.1.1-py27-none-any.whl
| Download URL | django_terminator-0.1.1-py27-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2.7 |
|
SHA-256 checksum How to use checksums |
f34f0c29306b7b420f9f28f8749c60592e2819dce1c5f6abaddd1bd9e2034b8c
|
|
BLAKE2b-256 checksum How to use checksums |
6a66c067bff7dd9b8677ee233fac203d4a5a84d7158bbeaec770f8f50db93ca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-terminator 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.