Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Herbie

CI Build

What is Herbie?

Herbie is an abstract data layer that makes it easier to exchange data across distributed systems. You define business entities such as “customer” or “order” as JSON schemas which you store in a central schema registry. Herbie can listen for data updates in one system and publish new data to other systems based on your business rules.

Why should you use Herbie

It simplifies the process of building integrations and connectors for all your systems. Maybe you want to build a connector between MailChimp and Salesforce, but also between MailChimp and Shopify, and maybe also between Salesforce and Shopify. Each time, you have to customize your connector to the requirements of the two systems. What if all your systems connected to one central data layer? - that’s Herbie.

Once all your systems are connected to Herbie, they can then talk to one another. Once the system can subscribe to changes in another system. Just updated your contacts in Salesforce? Your MailChimp connector can listen for the changes and update the Mailchimp database accordingly.

Overview

Herbie uses a schema registry combined with a central data store for business entities.

  • It's built with Django and comes with a simple API to create business entities.

  • The json-schema integration allows you to define custom schema definitions which Herbie uses to validate the entities.

  • By default, we provide support for Google Pub/Sub or AWS SNS/SQS to provide event streams — your services can subscribe to these event streams and find out when a certain entity-type is updated.

    However, you don't have to use Google Pub/Sub - you can also update Herbie to use your preferred messaging system.

The philosophy behind Herbie is to avoid behavior that seems like a "black box" and is instead built in very straightforward way, following Django best practices. It is also meant to be extendable and easy to adapt.

Further reading:

Getting started

Quick Start

The easiest and recommended way to start a new project is to clone the sandbox repository and follow the instructions.

Step by step guide

  1. Herbie is based on the Django framework, so the first step is to start a new Django project using postgres as database technology.

  2. After the Django-skeleton is set up, Herbie can be installed using a common package manager like pip.

    python -m pip install herbie
    

    You can also add Herbie to your requirements.txt.

  3. The next step is to configure the settings accordingly:

    a) Register Herbie and the django rest-framework in your installed apps.

    INSTALLED_APPS = [
        # ...
        'rest_framework',
        'rest_framework.authtoken',
        'herbie_core.apps.HerbieCoreConfig',
    ]
    

    b) Setup the token-authentication for the provided Herbie-API:

    REST_FRAMEWORK = {
       'DEFAULT_AUTHENTICATION_CLASSES': (
           'rest_framework.authentication.TokenAuthentication',
       ),
    }
    

    c) Define Schema package

    d) Select a Queueing technology (AWS SNS/SQS vs. Google Pubsub)

    e) Register herbie urls in your urls.py:

    from herbie_core import urls as herbie_urls
    
    urlpatterns = [
    # ...
        path('api/', include(herbie_urls)),
    ]
    
  4. Add schemas by either adding them to the remote repository or to a local package.

  5. Run the Django-App in preferred way-> link

  6. When app is running execute the following commands:

    1. Generate model classes for the sample business objects that are included in the Herbie schemas package.

      python manage.py generatemodels
      
    2. Create and execute migration files to initialize your database

      python manage.py makemigrations
      python manage.py migrate
      
    3. Load the schemas to the database:

      python manage.py import_json_schemas
      
    4. Create an admin user so that you can log in to the admin dashboard.

      python manage.py createsuperuser --username "username" --email "email@email-address.com"
      

Changing the messaging system

By default Herbie sandbox setup uses Google Pubsub for distributing the business entity messages in a JSON format. But it should be easy to use any other messaging system:

The different messaging systems are distributed as Python packages and are also based on Django. To use or add a new one it is as easy as registering a new Django app.

Check Google Pubsub adapter repository for detailed instructions.

Admin Panel

Metadata

Release files for herbie 1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for herbie 1.0b2
File Size Uploaded Provenance Actions
herbie-1.0b2.tar.gz 54.3 kB Without provenance Details for herbie-1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for herbie 1.0b2
File Interpreter ABI Platform Actions
herbie-1.0b2-py3-none-any.whl Python 3 none any Details for herbie-1.0b2-py3-none-any.whl

Total release size: 114.1 kB

Release files / herbie-1.0b2.tar.gz

Download URL herbie-1.0b2.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b4ce036cc1e0e81b236e614403682338eba606c35a8548b36902a0620cf31eb9
BLAKE2b-256 checksum
How to use checksums
f9ea353bd65837960dba0349789c2a3097f338d9896f6fe2317772004f4bb3ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Release files / herbie-1.0b2-py3-none-any.whl

Download URL herbie-1.0b2-py3-none-any.whl
Size 59.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
830bc3f3367d586423fb81d654faeeb48675d551477e339097ee32faa2e1da0f
BLAKE2b-256 checksum
How to use checksums
4f71b8dc4c0f0969fe76f716ddd1baa5ec1a822e863f40473af35ef04e4fe04e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Security for herbie 1.0b2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page