{"id":16344463,"url":"https://github.com/siddhant-k-code/run-cloud-functions-locally","last_synced_at":"2026-01-25T22:51:56.128Z","repository":{"id":236501342,"uuid":"792701115","full_name":"Siddhant-K-code/run-cloud-functions-locally","owner":"Siddhant-K-code","description":"Run Cloud Functions Locally or in Gitpod","archived":false,"fork":false,"pushed_at":"2024-04-27T11:22:24.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T07:29:00.447Z","etag":null,"topics":["cloud-functions","gitpod","local","serverless"],"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/Siddhant-K-code.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":"2024-04-27T10:20:47.000Z","updated_at":"2024-11-12T10:57:55.000Z","dependencies_parsed_at":"2024-04-27T13:59:54.513Z","dependency_job_id":"58d7b667-92ed-4679-9b1e-0f0d28704548","html_url":"https://github.com/Siddhant-K-code/run-cloud-functions-locally","commit_stats":null,"previous_names":["siddhant-k-code/run-cloud-functions-locally"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Siddhant-K-code/run-cloud-functions-locally","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Frun-cloud-functions-locally","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Frun-cloud-functions-locally/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Frun-cloud-functions-locally/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Frun-cloud-functions-locally/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Siddhant-K-code","download_url":"https://codeload.github.com/Siddhant-K-code/run-cloud-functions-locally/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Siddhant-K-code%2Frun-cloud-functions-locally/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cloud-functions","gitpod","local","serverless"],"created_at":"2024-10-11T00:28:25.094Z","updated_at":"2026-01-25T22:51:56.113Z","avatar_url":"https://github.com/Siddhant-K-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run Cloud Functions Locally 🌩️🚀\n\nWelcome to the exciting realm of cloud functions, where the magic of serverless computing comes alive on your local machine! This README will guide you through the enchanting process of setting up and running cloud functions locally, ensuring a pristine, isolated development environment with the aid of [**Gitpod**](https://www.gitpod.io/). 🧙‍♂️✨\n\n## Premise 🏗️\n\nFor this magical journey, Python will serve as our trusty runtime language. To avoid any mystical contamination in our local environment, I've set everything up in a dedicated Gitpod workspace. It's like conjuring your very own wizard's tower for code experimentation! 🏰\n\nBypass the implementation steps by leaping straight into this repository in Gitpod! Click the button below to teleport there (it's pre-configured for convenience 😉):\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Siddhant-K-code/run-cloud-functions-locally)\n\n## Implementation 🛠️\n\nFirst, let's enchant our `requirements.txt` file with a sprinkle of dependencies:\n\n```txt\nfunctions-framework==3.*\n```\n\nNow for the spell-casting—the code! Here's a simple Python script that summons a cloud function:\n\n```python\nimport functions_framework\n\n@functions_framework.http\ndef main(request):\n    return f'Hello, {request.json.get(\"name\")}\\n'\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Spell Details 🧐\n\n- `@functions_framework.http`: This powerful spell instructs our script to gear up for responding to HTTP requests as a Cloud Function.\n- It's crucial to always send a response back. Ignoring requests is a no-no in both the arcane and coding worlds—it prevents errors and keeps the magical and digital flows balanced.\n\n## Execution 🚀\n\nIt's time to animate our cloud function! Open your terminal (ensure it's not engaged with other magical commands) and recite the following spell:\n\n```sh\nfunctions-framework --target=main\n```\n\nOpen another terminal window (think of it as opening a portal to another dimension) and invoke your newly minted function:\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"name\":\"Siddhant\"}' http://localhost:8080\n```\n\nIf the cosmic energies align and your incantation is precise, you will be greeted with:\n\n```sh\nHello, Siddhant\n```\n\n\u003cimg width=\"1457\" alt=\"Run cloud functions locally or in Gitpod\" src=\"https://github.com/Siddhant-K-code/run-cloud-functions-locally/assets/55068936/c718ed92-68a2-4864-aa59-189854795de7\"\u003e\n\n## Epilogue 🌟\n\nRemember, the `functions-framework` is capable of more than just HTTP functions; it can also initiate event-driven functions. Perhaps that's an adventure we'll embark upon in the future!\n\n## References 📚\n\nFor more spells and scholarly knowledge, consult these ancient tomes (or just click here):\n\n- [Google Cloud Functions Framework Python](https://github.com/GoogleCloudPlatform/functions-framework-python)\n\nHappy coding, and best wishes on your serverless quest! \u003c3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhant-k-code%2Frun-cloud-functions-locally","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiddhant-k-code%2Frun-cloud-functions-locally","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhant-k-code%2Frun-cloud-functions-locally/lists"}