Herbie Adapter that publishes messages to Google Pubsub.
Project description
Google Pubsub Adapter
This Adapter is based on Django and provides a way to publish messages to Google Pubsub.
It is meant to be used with Herbie.
The package already provides a Django app that just needs to be registered in the main Django app using Herbie.
Installation
- Run the following
pip install herbie-google-pubsub-adapter
or add it to your app requirements.txt
and update them running:
pip install -r requirements.txt
- Add the adapter App to
Django Installed Apllications
:
INSTALLED_APPS = [
...
'google_pubsub_adapter.apps.HerbieGooglePubsubAdapterConfig',
...
]
- Add your Google Cloud Pubsub Credentials to the
django settings
file:
GCLOUD_PUBSUB_PROJECT_ID='pubsub_project_id'
- Create the Topics according to the Business Schemas
python manage.py init_pubsub
An example Django application using this adapter can be found at the Herbie Sandbox repository.
Developing/Testing
If you would like to further improve this package you'll need to install the dev/test requirmeents.
To to this run in your virtual environment
pip install -e .[tests]
This will install the needed packages (e.g: pytest
) to run/test locally the package
Black Formatter
This package uses Black as a code formatter. You should run it before pushing the code as the CI pipeline checks against it.
black --line-length 119 .
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 Distribution
Hashes for herbie-google-pubsub-adapter-1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46f9aba424cfa6f3b37f5233ea9d190f5aee66e7dacb3bb6e18049108e4ce5a4 |
|
MD5 | a42ccb47364ff55bb265e2cb444148b2 |
|
BLAKE2b-256 | a501a01ad032167cf0f9b5479863db31f1ff52ba5552d3f3313ca7a54a2f1f6f |
Hashes for herbie_google_pubsub_adapter-1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e2e8558677096065ab870f8ec59dc6420b33f256d095309616b2c06a857b99a |
|
MD5 | 43b2607e3cf6e3ec6e373f0c3b083335 |
|
BLAKE2b-256 | bdd7e41debe9f49de51956de13fe32f2a9db4bce1d257e2e174e4f5ac0addacd |