Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

hypefactors/py-pubsub-pipeline

Repository files navigation

pubsub_pipeline

A small utility class for connecting two Google Cloud Pubsub queues with a data processing component .

Install

pip install -e git+http://github.com/hypefactors/py-pubsub-pipeline.git@v0.0.1#egg=pubsub_pipeline

Usage

from pubsub_pipeline import PubSubPipeline


def processor(data: dict) -> dict:
    data['result'] = "Processing result"
    return data
    
if __name__ == '__main__':
    PubSubPipeline(
        processor=processor,
        google_cloud_project='some-project-name', 
        incoming_subscription='some/subscription/path',
        outgoing_topic='some-topic'
    ).process()
 

About

A big data processing pipeline based on Google PubSub and Python. Used in Hypefactors for rolling out AI enrichments at production scale.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages