Django tasks backend for Google Cloud Pub/Sub
Project description
django_tasks_pubsub
PostgreSQL-backed task pub/sub for Django.
Installation
pip install django_tasks_pubsub
INSTALLED_APPS = [
...
"django_tasks_pubsub",
]
Settings
PUBSUB_PROJECT_ID = "your-google-cloud-project-id"
PUBSUB_DEFAULT_TOPIC_ID = "your-default-topic-id"
TASKS = {
"default": {
"BACKEND": "django_tasks_pubsub.PubSubBackend",
}
}
Usage
Configure Django task functions
from django.tasks import task
@task
def send_email(user_id):
print(f"Sending email to {user_id}")
Configure specifics for the task
Specify a topic
Here we configure a task that publishes to the topic "resize_images"
from django.tasks import task
from django_tasks_pubsub import pubsub_task
@task
@pubsub_task(topic="resize_images")
def function(image_id):
...
Development
License
MIT
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tasks_pubsub-0.1.2.tar.gz.
File metadata
- Download URL: django_tasks_pubsub-0.1.2.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb6f05b1c69f9ce08e73d67d251c2037328c7670250a248ea0202f94a7c7ea64
|
|
| MD5 |
b950984f7052f833304c01da16116e99
|
|
| BLAKE2b-256 |
a6840bcbe4899ad77c553d7feca400ce91b2ac16723976e22998db783afbea72
|
Provenance
The following attestation bundles were made for django_tasks_pubsub-0.1.2.tar.gz:
Publisher:
create_tag_and_release.yml on joelbitar/django_tasks_pubsub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_pubsub-0.1.2.tar.gz -
Subject digest:
eb6f05b1c69f9ce08e73d67d251c2037328c7670250a248ea0202f94a7c7ea64 - Sigstore transparency entry: 1563769125
- Sigstore integration time:
-
Permalink:
joelbitar/django_tasks_pubsub@809b2960cb305a3f66bfd46fc2c23a07db03d807 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joelbitar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_tag_and_release.yml@809b2960cb305a3f66bfd46fc2c23a07db03d807 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tasks_pubsub-0.1.2-py3-none-any.whl.
File metadata
- Download URL: django_tasks_pubsub-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f179d8278c011aa5cd4bd77a52cd75158c43005863c7f50a30d364a4a03ac0
|
|
| MD5 |
cfc3be00d446e86bd1e6425588a7df29
|
|
| BLAKE2b-256 |
77173d17f8050375ebc4622f6ba73e7782deddf4c0b7554c0d95bb3ab7aed20c
|
Provenance
The following attestation bundles were made for django_tasks_pubsub-0.1.2-py3-none-any.whl:
Publisher:
create_tag_and_release.yml on joelbitar/django_tasks_pubsub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_pubsub-0.1.2-py3-none-any.whl -
Subject digest:
03f179d8278c011aa5cd4bd77a52cd75158c43005863c7f50a30d364a4a03ac0 - Sigstore transparency entry: 1563769127
- Sigstore integration time:
-
Permalink:
joelbitar/django_tasks_pubsub@809b2960cb305a3f66bfd46fc2c23a07db03d807 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/joelbitar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_tag_and_release.yml@809b2960cb305a3f66bfd46fc2c23a07db03d807 -
Trigger Event:
push
-
Statement type: