Skip to main content

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

  1. 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
  1. Add the adapter App to Django Installed Apllications:
    INSTALLED_APPS = [
        ...
        'google_pubsub_adapter.apps.HerbieGooglePubsubAdapterConfig',
        ...
    ]
  1. Add your Google Cloud Pubsub Credentials to the django settings file:
GCLOUD_PUBSUB_PROJECT_ID='pubsub_project_id'
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

herbie-google-pubsub-adapter-1.0b1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page