{"id":18684867,"url":"https://github.com/j-sephb-lt-n/flask-202-flow","last_synced_at":"2026-04-12T07:38:48.825Z","repository":{"id":234001730,"uuid":"724173234","full_name":"J-sephB-lt-n/flask-202-flow","owner":"J-sephB-lt-n","description":"Illustration of a Flask endpoint which continues to run code after a 202 response is sent to the client.","archived":false,"fork":false,"pushed_at":"2023-11-27T19:48:56.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T18:17:36.244Z","etag":null,"topics":["accepted","flask","http","python","rest-api"],"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}},"created_at":"2023-11-27T14:43:56.000Z","updated_at":"2023-11-27T20:23:34.000Z","dependencies_parsed_at":"2024-04-17T22:57:33.558Z","dependency_job_id":"51ddf438-d797-473a-a2d0-22ad7e6396ed","html_url":"https://github.com/J-sephB-lt-n/flask-202-flow","commit_stats":null,"previous_names":["j-sephb-lt-n/flask-202-flow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/J-sephB-lt-n/flask-202-flow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fflask-202-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fflask-202-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fflask-202-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fflask-202-flow/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/flask-202-flow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-sephB-lt-n%2Fflask-202-flow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31707953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["accepted","flask","http","python","rest-api"],"created_at":"2024-11-07T10:19:34.119Z","updated_at":"2026-04-12T07:38:48.773Z","avatar_url":"https://github.com/J-sephB-lt-n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-202-flow\n\nIllustration of a Flask endpoint which continues to run code *after* a 202 response is sent to the client.\n\n```bash\n# host HTTP server #\ngunicorn --bind :5000 --workers 1 --threads 4 --timeout 30 main:app\n```\n\n```bash\n# send a request #\ncurl --request POST \\\n'http://localhost:5000/202_flow_example?wait_n_secs_after_response=10'\n```\n```\nEndpoint Response:  ACCEPTED (202) at 20:56:54.379\n2023-11-27 20:56:54,380 INFO started after response code\n2023-11-27 20:56:55,385 INFO waited 1 seconds\n2023-11-27 20:56:56,390 INFO waited 2 seconds\n2023-11-27 20:56:57,394 INFO waited 3 seconds\n2023-11-27 20:56:58,399 INFO waited 4 seconds\n2023-11-27 20:56:59,403 INFO waited 5 seconds\n2023-11-27 20:57:00,408 INFO waited 6 seconds\n2023-11-27 20:57:01,411 INFO waited 7 seconds\n2023-11-27 20:57:02,417 INFO waited 8 seconds\n2023-11-27 20:57:03,420 INFO waited 9 seconds\n2023-11-27 20:57:04,423 INFO waited 10 seconds\n2023-11-27 20:57:04,427 INFO finished waiting 10 seconds\n```\n\nA request not generating a `202` response will not run the *after response* code:\n```bash\n# send a request #\ncurl --request POST \\\n'http://localhost:5000/202_flow_example?wait_n_secs_after_response=99999'\n```\n```\nEndpoint Response:  FORBIDDEN (403) at 20:58:45.598\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-sephb-lt-n%2Fflask-202-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-sephb-lt-n%2Fflask-202-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-sephb-lt-n%2Fflask-202-flow/lists"}