{"id":38860796,"url":"https://github.com/haitwang-cloud/fastapi-alembic-sqlmodel-sample","last_synced_at":"2026-01-17T14:21:46.809Z","repository":{"id":45068785,"uuid":"440130288","full_name":"haitwang-cloud/fastapi-alembic-sqlmodel-sample","owner":"haitwang-cloud","description":"Make an out-of-the-box backend based on FastAPI","archived":false,"fork":false,"pushed_at":"2024-04-12T03:25:52.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-12T11:16:26.538Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haitwang-cloud.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":"2021-12-20T10:32:29.000Z","updated_at":"2021-12-31T07:33:52.000Z","dependencies_parsed_at":"2024-04-12T04:31:57.408Z","dependency_job_id":"0e3a383d-b146-45a5-bc53-c148263781d3","html_url":"https://github.com/haitwang-cloud/fastapi-alembic-sqlmodel-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haitwang-cloud/fastapi-alembic-sqlmodel-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haitwang-cloud%2Ffastapi-alembic-sqlmodel-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haitwang-cloud%2Ffastapi-alembic-sqlmodel-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haitwang-cloud%2Ffastapi-alembic-sqlmodel-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haitwang-cloud%2Ffastapi-alembic-sqlmodel-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haitwang-cloud","download_url":"https://codeload.github.com/haitwang-cloud/fastapi-alembic-sqlmodel-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haitwang-cloud%2Ffastapi-alembic-sqlmodel-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":[],"created_at":"2026-01-17T14:21:46.750Z","updated_at":"2026-01-17T14:21:46.797Z","avatar_url":"https://github.com/haitwang-cloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi-app-sample\n\nMake an out-of-the-box backend based on FastAPI\n\n```bash\nFastAPI + MySQL + Requests+ alembic + SQLmodel + aiohttp + sqlalchemy\n```\n\n\n### Project screen shoot\n![](./sample.gif)\n\n### Project API doc\n\n```bash\nhttp://0.0.0.0:8000\n```\n\n### Tree view\n```bash\n├── Dockerfile\n├── LICENSE\n├── README.md\n├── alembic\n│   ├── README\n│   ├── env.py\n│   ├── script.py.mako\n│   └── versions\n├── alembic.ini\n├── app\n│   ├── client\n│   │   ├── cats_client.py\n│   │   ├── hitokoto_client.py\n│   │   └── http.py\n│   ├── db\n│   │   ├── crud.py\n│   │   ├── database.py\n│   │   └── init.py\n│   ├── models\n│   │   ├── __init__.py\n│   │   └── models.py\n│   ├── router\n│   │   ├── animal.py\n│   │   ├── api.py\n│   │   ├── db.py\n│   │   └── tools.py\n│   ├── test\n│   │   ├── benchmarktest\n│   │   │   └── locustfile.py\n│   │   └── unnitest\n│   │       └── test_animal.py\n│   └── utils\n│       ├── log_init.py\n│       └── logging_config.json\n├── config.ini\n├── docker\n│   ├── build.sh\n│   └── run.sh\n├── handler.py\n├── main.py\n├── migration\n├── pip.conf\n├── requirements.txt\n└── sample.gif\n```\n\n## Database\n\nOffical\ndocs: [https://alembic.sqlalchemy.org/en/latest/tutorial.html](https://alembic.sqlalchemy.org/en/latest/tutorial.html)\n\n### Init\n\n```bash\nalembic init alembic\n```\n\n### Editing the alembic.ini File\n\n```bash\n Please edit configuration/connection/logging settings in './fastapi-app-sample/alembic.ini' before proceeding\n```\n\n### Create a Migration Script\n\n```bash\nalembic revision -m \"create account table\"\nGenerating /path/to/yourproject/alembic/versions/1975ea83b712_create_accoun\nt_table.py...done\n```\n\n## Docker\n\n### how to build images\n\n```bash\nsh docker/build.sh\n```\n\n## how to run\n\n```bash\nsh docker/run.sh\n```\n## Test\n### unnitest\n[pytest](https://docs.pytest.org/en/6.2.x/)\n### benchmarkest\n[locust](http://docs.locust.io/en/stable/configuration.html)\n## References\n\n- [https://fastapi.tiangolo.com/tutorial/](https://fastapi.tiangolo.com/tutorial/)\n- [https://sqlmodel.tiangolo.com/](https://sqlmodel.tiangolo.com/)\n- [https://docs.aiohttp.org/en/stable/](https://docs.aiohttp.org/en/stable/)\n- [https://github.com/Delgan/loguru](https://github.com/Delgan/loguru)\n- [https://docs.python-requests.org/en/master/](https://docs.python-requests.org/en/master/)\n- [https://docs.sqlalchemy.org/en/14/](https://docs.sqlalchemy.org/en/14/)\n- [https://github.com/alembic/alembic](https://github.com/alembic/alembic)\n\n\n## Commit History\n\n[![Commit History Chart](https://commit-history-api.herokuapp.com/svg?repos=haitwang-cloud/fastapi-alembic-sqlmodel-sample\u0026type=Timeline)](https://the-commit-history.vercel.app/#haitwang-cloud/fastapi-alembic-sqlmodel-sample\u0026Timeline)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaitwang-cloud%2Ffastapi-alembic-sqlmodel-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaitwang-cloud%2Ffastapi-alembic-sqlmodel-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaitwang-cloud%2Ffastapi-alembic-sqlmodel-sample/lists"}