{"id":16497197,"url":"https://github.com/guillaumefalourd/webhooks-python","last_synced_at":"2025-03-01T14:40:33.924Z","repository":{"id":103343311,"uuid":"438261357","full_name":"GuillaumeFalourd/webhooks-python","owner":"GuillaumeFalourd","description":"POC of sending and receiving webhooks in Python 🐍","archived":false,"fork":false,"pushed_at":"2021-12-14T14:05:19.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T06:07:12.587Z","etag":null,"topics":["devops","flask","python","webhooks"],"latest_commit_sha":null,"homepage":"https://devopslifecycle.com/","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/GuillaumeFalourd.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}},"created_at":"2021-12-14T13:22:24.000Z","updated_at":"2022-01-21T17:21:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed5d030c-6347-4931-bd2a-a45ea416aa96","html_url":"https://github.com/GuillaumeFalourd/webhooks-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fwebhooks-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fwebhooks-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fwebhooks-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fwebhooks-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuillaumeFalourd","download_url":"https://codeload.github.com/GuillaumeFalourd/webhooks-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241381519,"owners_count":19953749,"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":["devops","flask","python","webhooks"],"created_at":"2024-10-11T14:38:42.955Z","updated_at":"2025-03-01T14:40:33.901Z","avatar_url":"https://github.com/GuillaumeFalourd.png","language":"Python","readme":"# webhooks-python\n\n[![Security Pipeline](https://github.com/GuillaumeFalourd/webhooks-python/actions/workflows/security-pipeline.yaml/badge.svg)](https://github.com/GuillaumeFalourd/webhooks-python/actions/workflows/security-pipeline.yaml) [![Call webhook remote](https://github.com/GuillaumeFalourd/webhooks-python/actions/workflows/webhook_remote.yaml/badge.svg)](https://github.com/GuillaumeFalourd/webhooks-python/actions/workflows/webhook_remote.yaml)\n\nPOC of sending and receiving webhooks in Python 🐍\n\n## References\n\n- [How to Send Webhooks with Python](https://www.youtube.com/watch?v=X-_25tzo8Cw\u0026ab_channel=DevOpsJourney)\n- [How to Receive Webhooks with Python](https://www.youtube.com/watch?v=HQLRPWi2SeA\u0026ab_channel=DevOpsJourney)\n\n## Usage\n\nFirst, if you don't have the dependencies installed on your computer, run:\n\n```shell\npip install -r requirements.txt\n```\n\n* * *\n\n### 📤 Sender (Remote)\n\nYou will be able to send a webhook request remotely running the `webhook_remote.py` file by using `python webhook_remote.py`.\n\n[Check the request output here](https://webhook.site/#!/61a89a13-0f6d-4116-ae4d-95e4854683b3/c7169b86-9405-4dd9-9233-a87a19007210/1)\n\n_Note: You can update the webhook online url on the `webhook_remote.py` file by creating your own for free on the [Webhook site](https://webhook.site/)._\n\n#### Demo Sender (Remote)\n\n```shell\n➜ python webhook_remote.py\nSuccess\n```\n\n\u003cimg width=\"1427\" alt=\"Screen Shot 2021-12-14 at 10 31 24\" src=\"https://user-images.githubusercontent.com/22433243/146008397-addda76d-98fe-4042-ad9a-396eed500cac.png\"\u003e\n\n* * *\n\n### 📥 Receiver\n\nYou will be able to run the server by using `python server.py`.\n\n#### Demo Receiver\n\n```shell\n➜  python server.py\n * Serving Flask app 'server' (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: off\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n```\n\nAccessing the `http://127.0.0.1:5000/` on your navigator, you'll see somthing like this:\n\n\u003cimg width=\"332\" alt=\"Screen Shot 2021-12-14 at 10 45 11\" src=\"https://user-images.githubusercontent.com/22433243/146011158-49ad5c5e-056d-4485-bbf8-7c28bef25b51.png\"\u003e\n\n* * *\n\n### 📤 Sender (Local)\n\nYou will be able to send a webhook request locally to the server above running the `webhook_local.py` file by using `python webhook_local.py` (on another terminal than the one where the `server.py` script is running).\n\n#### Demo Sender (Local)\n\n```shell\n➜ python webhook_local.py\nSuccess\n```\n\nIf you do so, the terminal with the `server.py` script running will return the JSON it received:\n\n```shell\n➜  python server.py\n * Serving Flask app 'server' (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: off\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n{'name': 'Guillaume', 'phone': '+553499999-9999', 'email': 'guillaume@test.com'}\n127.0.0.1 - - [14/Dec/2021 10:48:06] \"POST /webhook HTTP/1.1\" 200 -\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumefalourd%2Fwebhooks-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillaumefalourd%2Fwebhooks-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumefalourd%2Fwebhooks-python/lists"}