{"id":20173103,"url":"https://github.com/ohmycloud/fastapi_db_pool","last_synced_at":"2026-05-08T20:32:06.205Z","repository":{"id":223097235,"uuid":"745362837","full_name":"ohmycloud/fastapi_db_pool","owner":"ohmycloud","description":"FastAPI 数据库连接池(Example)","archived":false,"fork":false,"pushed_at":"2024-01-22T07:37:07.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T21:49:35.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ohmycloud.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}},"created_at":"2024-01-19T07:06:44.000Z","updated_at":"2024-02-18T07:27:24.000Z","dependencies_parsed_at":"2024-02-18T09:26:56.319Z","dependency_job_id":"6dc4fb32-9fa6-417c-9e34-be61bee4d718","html_url":"https://github.com/ohmycloud/fastapi_db_pool","commit_stats":null,"previous_names":["ohmycloud/fastapi_db_pool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ohmycloud/fastapi_db_pool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmycloud%2Ffastapi_db_pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmycloud%2Ffastapi_db_pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmycloud%2Ffastapi_db_pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmycloud%2Ffastapi_db_pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohmycloud","download_url":"https://codeload.github.com/ohmycloud/fastapi_db_pool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmycloud%2Ffastapi_db_pool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32795881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-11-14T01:33:26.091Z","updated_at":"2026-05-08T20:32:06.189Z","avatar_url":"https://github.com/ohmycloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast-API with DB Connection Pools\n\n## Problem Statement\n\n### Some common problems with database connections\n1. Database connection limit exceeded\n2. Database connection timeout\n3. Database connection is not closed properly\n4. Database connection is not released properly\n\n创建一个 Postgres 数据库表, 包含 `id`, `fname`, `lname`, `email`, `password` 这些字段：\n\n```sql\nCREATE TABLE public.user\n(\n    id serial PRIMARY KEY,\n    fname VARCHAR(50) NOT NULL,\n    lname VARCHAR(50) NOT NULL,\n    email VARCHAR(50) NOT NULL,\n    password VARCHAR(50) NOT NULL\n);\n```\n\n连接池的创建参考：https://github.com/tiangolo/fastapi/discussions/9097\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmycloud%2Ffastapi_db_pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohmycloud%2Ffastapi_db_pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmycloud%2Ffastapi_db_pool/lists"}