{"id":34851463,"url":"https://github.com/shiningflash/python-pubsub","last_synced_at":"2026-04-27T09:01:34.961Z","repository":{"id":111950231,"uuid":"446884809","full_name":"shiningflash/python-pubsub","owner":"shiningflash","description":"PubSub using python and different platform eg. google cloud, redis etc.","archived":false,"fork":false,"pushed_at":"2022-01-12T18:52:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T04:19:59.996Z","etag":null,"topics":["googlecloudplatform","pubsub","python","redis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiningflash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-11T15:50:12.000Z","updated_at":"2022-01-12T19:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddc501bd-8cd7-4950-8f5d-1f04af7bf4c7","html_url":"https://github.com/shiningflash/python-pubsub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shiningflash/python-pubsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiningflash%2Fpython-pubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiningflash%2Fpython-pubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiningflash%2Fpython-pubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiningflash%2Fpython-pubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiningflash","download_url":"https://codeload.github.com/shiningflash/python-pubsub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiningflash%2Fpython-pubsub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["googlecloudplatform","pubsub","python","redis"],"created_at":"2025-12-25T19:20:06.330Z","updated_at":"2026-04-27T09:01:34.956Z","avatar_url":"https://github.com/shiningflash.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [python-pubsub](https://github.com/shiningflash/python-pubsub)\n\n---\n\n## [1. Using Google Cloud Service (project: smart home)](https://github.com/shiningflash/python-pubsub/tree/main/smart_home)\n\nWe're going to enable Google Cloud Platform's Pub/Sub API and write a publisher and a subscriber in Python. Then we're going to allow for more than just string data to be sent.\n\nSomething to keep in mind is that Pubsub is almost always a nice-to-have. It's not a necessity. We use it to build a workflow with websites and cloud hosting, passing messages between services that otherwise don't talk to each other. Pubsub's great at storing our topic messages and letting cloud functions trigger and fire to keep a workflow running.\n\n### Set up google cloud\n\n---\n\n1. go to [google cloud console](https://console.cloud.google.com/).\n2. search pub/sub and go to pub/sub.\n3. create a topic. It will create a subscriptions also. (If not created automatically, create one.)\n4. go to Navigation Menu \u003e\u003e IAM \u0026 Admin \u003e\u003e Service Accounts. Create a service account.\n5. go to the newly created service account \u003e\u003e KEYS. Create a new key and download. This is your private key. (Don't share it to anyone, otherwise they can access your account.) Move the private to your project repository folder.\n\nYou're ready to go!!!\n\n### Requirements\n\n---\n\n```\n$ pip3 install --upgrade google-cloud-pubsub\n```\n\n### Run code\n\n---\n\n```\n$ python3 publisher.py\n$ python3 subscriber.py\n```\n\n---\n\n## [2. Using Redis (project: control center)](https://github.com/shiningflash/python-pubsub/tree/main/control_center)\n\nThis video is about the PUB/SUB feature of redis which allows you create message queues, and it could even be utilized to create a small control center in which the clients perform operations based on the channels they are subscribed to.\n\n### Set up Redis\n\n---\n\nI am showing commands to install redis in mac. For linux and windows user, please, learn from internet if redis is not present in your device.\n\n```\n$ brew update\n$ brew install redis\n```\n\nTo start redis, `$ brew services start redis`.\nTo stop redis, `$ brew services stop redis`.\nTo test redis, `$ redis-cli ping`. It will response with 'PONG`, if everything is good! To go to redis config file, `$ nano /usr/local/etc/redis.conf`.\n\nYou're ready to go!!\n\n### Requirements\n\n---\n\n```\n$ pip3 install redis\n```\n\n### Run code\n\n---\n\n```\n$ python3 publisher.py \u003cenvironment_name\u003e \u003caction_name\u003e\n$ python3 subscriber.py\n```\n\nFor example, `$ python3 publisher.py dev 'stop server'`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiningflash%2Fpython-pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiningflash%2Fpython-pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiningflash%2Fpython-pubsub/lists"}