semvec/pypi-packages huggingface dataset:
shopcloud-eventbus 1.5.0
CLI tool for the Shopcloud EventBus
License: MIT
Keywords: CLI

# Shopcloud-EventBus

Async Processing, write to Log an Event and send it to a Queue

```mermaid
graph TD;
    AppEngine-->Log;
    Log-->EventBus;
    EventBus-->AppEngine;
```

## Usage

````sh
$ pip install shopcloud-eventbus
````

```sh
$ eventbus init
$ eventbus deploy
```

__Vanilla:__

````py
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](https://pypi.org/project/shopcloud-django-toolbox/) library

```py
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](https://console.cloud.google.com/logs/router/sink) with the following filter `resource.type="gae_app" "event-fire"`

```sh
$ eventbus --help
$ eventbus deploy
```

## Development

```sh
$ 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

```sh
$ 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

```sh

```

### Deploy

```sh
$ rm -rf build dist
$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/*
```
shopcloud-secrethub 2.17.0
CLI tool for the Shopcloud SecretHub
License: MIT
Keywords: CLI

# Shopcloud SecretHub CLI

The SecretHub CLI provides the command-line interface to interact with the SecretHub API.

## install

```
$ pip install shopcloud_secrethub
```

### Usage


__Reading and writing secrets:__

```sh
$ secrethub auth
$ secrethub read <secret-name>
$ secrethub write <secret-name> <value>
```


__Provisioning your applications with secrets:__

Provision a template file

```sh
$ secrethub inject -i app.temp.yaml -o app.yaml

# app.temp.yaml
env_variables:
  ENV: {{ talk-point/test-repo/env }}
  SECRET_KEY: {{ talk-point/test-repo/secret_key }}

```

Provision to the environment

```sh
$ eval `secrethub printenv -i app.temp.yaml`

# app.temp.yaml
env_variables:
  ENV: {{ talk-point/test-repo/env }}
  SECRET_KEY: {{ talk-point/test-repo/secret_key }}

```

__in Code:__

```py
from shopcloud_secrethub import SecretHub
hub = SecretHub(user_app="test-script", api_token='<TOKEN>')
hub.read('talk-point/test-repo/secret_key')
```

### Deploy to PyPi

```sh
$ rm -rf build dist
$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/*
```
shopcloud-streams 1.4.0
CLI Tool for Shopcloud Streams
License: MIT
Keywords: CLI

# Shopcloud-Streams-CLI

Shopcloud Streams CLI Package thats send the events per PubSub to the 
streams backend where the magic happend.

## Install

```py
$ pip install shopcloud-streams
````

## Usage

```py
from shopcloud_streams import Event as StreamEvent
Event("de.talk-point.streams/test_fired", {'pk' :'<pk>'}).fire()
```

## Develop

```sh
$ pytest
```