{"id":17739012,"url":"https://github.com/pierrekieffer/pubsub-pytoolbox","last_synced_at":"2025-03-31T19:44:53.573Z","repository":{"id":120128927,"uuid":"303957487","full_name":"PierreKieffer/pubsub-pytoolbox","owner":"PierreKieffer","description":"Google Cloud Platform Pub/Sub python toolbox","archived":false,"fork":false,"pushed_at":"2020-10-14T14:48:07.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-07T01:31:41.813Z","etag":null,"topics":["gcp-pubsub","pubsub","pubsub-interface","pubsub-publisher","pubsub-subscriber"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PierreKieffer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-14T08:54:39.000Z","updated_at":"2020-10-14T14:48:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"56e1ff74-8f09-44e1-920e-1c4e6f073a24","html_url":"https://github.com/PierreKieffer/pubsub-pytoolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierreKieffer%2Fpubsub-pytoolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierreKieffer%2Fpubsub-pytoolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierreKieffer%2Fpubsub-pytoolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierreKieffer%2Fpubsub-pytoolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PierreKieffer","download_url":"https://codeload.github.com/PierreKieffer/pubsub-pytoolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246531986,"owners_count":20792735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp-pubsub","pubsub","pubsub-interface","pubsub-publisher","pubsub-subscriber"],"created_at":"2024-10-26T02:06:57.210Z","updated_at":"2025-03-31T19:44:53.543Z","avatar_url":"https://github.com/PierreKieffer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pubsub-pytoolbox\nGoogle Cloud Platform Pub/Sub toolbox \n\n## Prerequisities \n- GCP project with a Pub/Sub up \u0026 running. \n- GCP service account and the credential file `private_key.json` associated.\n\n## Install \n```bash\npip install .\n```\n\n## Usage \n### Publisher\n```python\nimport json\nfrom pubsub.op import publisher\n\ndata = {\"field1\" : \"value1\", \"field2\" : \"value2\"}\nevent = json.dumps(data)\n\npublisher.publish(\"PROJECT_ID\", \"TOPIC_ID\", \"private_key.json\", event)\n```\n\n### Consumer\nStart a background thread to receive messages from Pub/Sub and calls a callback with each message received.\n\n```python\nfrom pubsub.op import consumer\n\nconsumer.consume(\"PROJECT_ID\", \"SUBSCRIBER_ID\", \"private_key.json\")\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierrekieffer%2Fpubsub-pytoolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierrekieffer%2Fpubsub-pytoolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierrekieffer%2Fpubsub-pytoolbox/lists"}