{"id":18684879,"url":"https://github.com/j-sephb-lt-n/api-gateway-reverse-proxy-python-flask","last_synced_at":"2026-04-28T21:33:34.373Z","repository":{"id":205449563,"uuid":"714260981","full_name":"J-sephB-lt-n/api-gateway-reverse-proxy-python-flask","owner":"J-sephB-lt-n","description":"A simple API Gateway (reverse proxy) implementation in python using requests and Flask","archived":false,"fork":false,"pushed_at":"2024-02-03T11:28:29.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T18:17:42.378Z","etag":null,"topics":["api","api-gateway","flask","gateway","python","requests","reverse-proxy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/J-sephB-lt-n.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":"2023-11-04T11:47:37.000Z","updated_at":"2023-11-04T12:11:13.000Z","dependencies_parsed_at":"2024-02-03T12:29:49.317Z","dependency_job_id":null,"html_url":"https://github.com/J-sephB-lt-n/api-gateway-reverse-proxy-python-flask","commit_stats":null,"previous_names":["j-sephb-lt-n/api-gateway-reverse-proxy-python-flask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/J-sephB-lt-n/api-gateway-reverse-proxy-python-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fapi-gateway-reverse-proxy-python-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fapi-gateway-reverse-proxy-python-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fapi-gateway-reverse-proxy-python-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fapi-gateway-reverse-proxy-python-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J-sephB-lt-n","download_url":"https://codeload.github.com/J-sephB-lt-n/api-gateway-reverse-proxy-python-flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fapi-gateway-reverse-proxy-python-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["api","api-gateway","flask","gateway","python","requests","reverse-proxy"],"created_at":"2024-11-07T10:19:36.055Z","updated_at":"2026-04-28T21:33:34.354Z","avatar_url":"https://github.com/J-sephB-lt-n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# api-gateway-reverse-proxy-python-flask\nA simple API Gateway (reverse proxy) implementation in [python](https://www.python.org) using [requests](https://github.com/psf/requests) and [Flask](https://github.com/pallets/flask)\n\nNote that there are certain HTTP functions which have not been handled in this simple implementation (e.g.forwarding client headers). \n\n```bash\n~$ flask --app gateway run --port 5000 \u0026\n~$ curl --location 'http://localhost:5000/does_not_exist/v1'\nendpoint '/does_not_exist/v1' not found\n~$ curl -X POST --location 'http://localhost:5000/test_post_request/v1' --header 'Content-Type: application/json' --data '{\"test\": 123}'\n\u003creturns response from https://httpbin.org/post\u003e\n~$ pkill -f flask -SIGTERM\n```\n\nBecause an API-Gateway is by nature I/O-bound (i.e. it spends most of it's time waiting, as opposed to doing computation), it will strongly benefit from asynchronous workers, for example using [gevent](https://github.com/gevent/gevent):\n\n```bash\npip install gunicorn\npip install gevent\ngunicorn --bind :8000 --workers 3 --worker-class=gevent --worker-connections=999 main:gateway\n```\n\n(refer to [gunicorn design docs](https://docs.gunicorn.org/en/stable/design.html) for more information)\n\nHere is a more complete gateway example:\n\n```bash\n# start local flask servers (in the background) #\nflask --app gateway run --port 5000 \u0026\nflask --app endpoints run --port 8000 \u0026\n\n# send some requests through the gateway #\ncurl -X POST --location 'http://localhost:5000/return_to_sender/v1?key=test' --header 'Content-Type: application/json' --data '{\"test\": 123}'\n\n# stop local flask servers #\npkill -f flask -SIGTERM\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-sephb-lt-n%2Fapi-gateway-reverse-proxy-python-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-sephb-lt-n%2Fapi-gateway-reverse-proxy-python-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-sephb-lt-n%2Fapi-gateway-reverse-proxy-python-flask/lists"}