Shopcloud-EventBus
Async Processing, write to Log an Event and send it to a Queue
graph TD;
AppEngine-->Log;
Log-->EventBus;
EventBus-->AppEngine;
Usage
$ pip install shopcloud-eventbus
$ eventbus init
$ eventbus deploy
Vanilla:
from shopcloud_eventbus import Event
event = Event(
name="de.talk-point.platform/module/model/sync",
model=self,
)
event.add_task(
queue="default",
url=f"module/api/model/{self.id}/action/",
json={}
)
event.fire()
Django
use for example the shopcloud-django-toolbox library
from shopcloud_django_toolbox import Event
event = Event(
name="de.talk-point.platform/module/model/sync",
model=self,
)
event.add_task(
queue="default",
url=f"module/api/model/{self.id}/action/",
json={}
)
event.fire()
Install
Services
$ gcloud services enable cloudtasks.googleapis.com --project="test-eventbus-project"
$ gcloud pubsub topics create events --project='test-eventbus-project'
$ gcloud tasks queues create default --project='test-eventbus-project' --location='europe-west3'
Log Sink
Create a log sink with the following filter resource.type="gae_app" "event-fire"
$ eventbus --help
$ eventbus deploy
Development
$ python3 setup.py install
$ python3 -m shopcloud_eventbus -d init --project="test-eventbus-project" --region="europe-west3" --app-endpoint="https://test-eventbus-project.ey.r.appspot.com" --secrethub-endpoint-user="talk-point/app-eventbus-test/production/evenbus-user" --secrethub-endpoint-pwd="talk-point/app-eventbus-test/production/evenbus-pwd"
$ python3 -m shopcloud_eventbus -d deploy
dann kann das Script getestet werden per
$ cd .eventbus
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ functions-framework --target main_http --debug
oder deployen und eine Test-Message durchsenden
Deploy
$ rm -rf build dist
$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/*
Metadata
Release files for shopcloud-eventbus 1.6.0
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 |
|---|---|---|---|---|
| shopcloud_eventbus-1.6.0.tar.gz | 9.3 kB | Without provenance | Details for shopcloud_eventbus-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shopcloud_eventbus-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for shopcloud_eventbus-1.6.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / shopcloud_eventbus-1.6.0.tar.gz
| Download URL | shopcloud_eventbus-1.6.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38b3a49211fee60368dd1b7e6d3349f20a134180f63d8c7539a0b126397e3bc1
|
|
BLAKE2b-256 checksum How to use checksums |
b6cd89f37df8d5915c2623afdf5533eecce30a72e3e1be9fbb47abd103766789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / shopcloud_eventbus-1.6.0-py3-none-any.whl
| Download URL | shopcloud_eventbus-1.6.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d7de66d2a21064619f26ad22617d1238eda114a2d56ca9b3265074a51b55fad
|
|
BLAKE2b-256 checksum How to use checksums |
64aded325eca594a290d1a91ef4421d012ecdd2e3a3becbb3601c8ce52e06df4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for shopcloud-eventbus 1.6.0
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.