CLI tool for the Shopcloud EventBus
Project description
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/*
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 Distributions
Close
Hashes for shopcloud_eventbus-1.0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36e853f7a3029bc635af2cecbc235dc27fa96fc1c441908dbb10152ca7cacd7c |
|
MD5 | f14442beec9f40854b0be7a328f071a1 |
|
BLAKE2b-256 | 98b5da7c0a1277feb9a1a5ec5b2ae33cbeee5c52b41f453507af6fda3003c376 |
Close
Hashes for shopcloud_eventbus-1.0.10-py3.11.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4beb89f0e64710d24225d2a3702d5d02c03ff301511d1e25ed507fac0569f565 |
|
MD5 | d2e52d60f4655575886151bc879a6744 |
|
BLAKE2b-256 | 77aa2c7a079a1c06fd110ede233fa58089608f6ec43cd1bf644ad353acec9c4c |
Close
Hashes for shopcloud_eventbus-1.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef59df5df9f06da8cdcbe316179937ac633ae47721ad6bc72bc42b3731d495bd |
|
MD5 | 5950957ad3cea228f7a9e6d7ddf55b95 |
|
BLAKE2b-256 | 5dce4d59ccfa35d15c6d590b8aa70fa2723fdad866b9f5208bd944898826a5e5 |