{"id":19755193,"url":"https://github.com/fastapi-practices/fastapi_sqlmodel_mysql","last_synced_at":"2025-05-12T17:14:05.989Z","repository":{"id":211128215,"uuid":"706057999","full_name":"fastapi-practices/fastapi_sqlmodel_mysql","owner":"fastapi-practices","description":"fastapi + pydantic-v2 + sqlmodel + alembic + mysql + redis","archived":false,"fork":false,"pushed_at":"2024-02-21T20:11:30.000Z","size":43,"stargazers_count":17,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T17:14:03.919Z","etag":null,"topics":["fastapi","fastapi-sqlmodel","fastapi-template","pydantic-v2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastapi-practices.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://wu-clan.github.io/sponsor/"}},"created_at":"2023-10-17T08:17:53.000Z","updated_at":"2025-04-16T07:47:11.000Z","dependencies_parsed_at":"2023-12-06T17:29:02.969Z","dependency_job_id":"7b245f19-7b6d-458e-934f-d3ba82cab794","html_url":"https://github.com/fastapi-practices/fastapi_sqlmodel_mysql","commit_stats":null,"previous_names":["fastapi-practices/fastapi_sqlmodel_mysql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi-practices%2Ffastapi_sqlmodel_mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi-practices%2Ffastapi_sqlmodel_mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi-practices%2Ffastapi_sqlmodel_mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi-practices%2Ffastapi_sqlmodel_mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastapi-practices","download_url":"https://codeload.github.com/fastapi-practices/fastapi_sqlmodel_mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253785009,"owners_count":21963903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fastapi","fastapi-sqlmodel","fastapi-template","pydantic-v2"],"created_at":"2024-11-12T03:09:25.562Z","updated_at":"2025-05-12T17:14:05.969Z","avatar_url":"https://github.com/fastapi-practices.png","language":"Python","readme":"# FastAPI SQLModel Architecture\n\n作为 FastAPI 框架的一个基础项目，基于 python3.10 开发\n\n## 特征\n\n- [x] FastAPI \u003e 0.100.0\n- [x] Async design\n- [x] Restful API\n- [x] SQLAlchemy 2.0\n- [x] Pydantic 2.0\n- [ ] ......\n\n## TODO\n\n- [ ] Docker\n\n## 使用\n\n\u003e [!WARNING]\n\u003e 此过程请格外注意端口占用情况, 特别是 8000, 3306, 6379...\n\n### 1: 传统\n\n1. 安装依赖项\n\n    ```shell\n    pip install -r requirements.txt\n    ```\n\n2. 创建一个数据库 `fsm`, 选择 utf8mb4 编码\n3. 安装启动 redis\n4. 在 `backend/app/` 目录下创建一个 `.env` 文件\n\n    ```shell\n    cd backend/app/\n    touch .env\n    ```\n\n5. 复制 `.env.example` 到 `.env`\n\n   ```shell\n   cp .env.example .env\n   ```\n\n6. 数据库迁移 [alembic](https://alembic.sqlalchemy.org/en/latest/tutorial.html)\n\n    ```shell\n    cd backend/app/\n    \n    # 生成迁移文件\n    alembic revision --autogenerate\n    \n    # 执行迁移\n    alembic upgrade head\n    ```\n\n7. 执行 backend/app/main.py 文件启动服务\n8. 浏览器访问: http://127.0.0.1:8000/api/v1/docs\n\n---\n\n### 2: docker\n\n[TODO](#TODO)\n\n## 互动\n\n[WeChat / QQ](https://github.com/wu-clan)\n\n## 赞助\n\n如果此项目能够帮助到你，你可以赞助作者一些咖啡豆表示鼓励：[:coffee: Sponsor :coffee:](https://wu-clan.github.io/sponsor/)\n\n## 许可证\n\n本项目根据 MIT 许可证的条款进行许可\n","funding_links":["https://wu-clan.github.io/sponsor/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastapi-practices%2Ffastapi_sqlmodel_mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastapi-practices%2Ffastapi_sqlmodel_mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastapi-practices%2Ffastapi_sqlmodel_mysql/lists"}