File tree Expand file tree Collapse file tree
templates/project/{{ cookiecutter.folder_name }} Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060
6161+ [ ] 提供英文文档版本
6262
63- + [ ] 提供 PostgreSQL、SQLite 数据库支持
63+ + [x ] 提供 PostgreSQL、SQLite 数据库支持
6464
6565+ [x] 提供完整的 run 方法
6666
Original file line number Diff line number Diff line change @@ -41,8 +41,9 @@ class License(BaseEnum):
4141
4242
4343class Database (BaseEnum ):
44- # POSTGRES = "Postgres "
44+ POSTGRESQL = "PostgreSQL "
4545 MYSQL = "MySQL"
46+ SQLITE = "SQLite"
4647
4748
4849class DBCmd (BaseEnum ):
Original file line number Diff line number Diff line change @@ -12,14 +12,23 @@ readme = "README.md"
1212[tool .poetry .dependencies ]
1313python = " ^{{ cookiecutter.python }}"
1414fastapi = " {{ cookiecutter.fastapi }}"
15+ {% if cookiecutter.database == 'MySQL' -%}
1516aiomysql = " ^0.2.0"
17+ pymysql = " ^1.1.1"
18+ {% endif -%}
19+ {% if cookiecutter.database == 'PostgreSQL' -%}
20+ asyncpg = " ^0.29.0"
21+ psycopg2-binary = " ^2.9.9"
22+ {% endif -%}
23+ {% if cookiecutter.database == 'SQLite' -%}
24+ aiosqlite = " ^0.19.0"
25+ {% endif -%}
1626alembic = " ^1.13.2"
1727bcrypt = " ^4.2.0"
1828databases = " ^0.9.0"
1929email-validator = " ^2.2.0"
2030loguru = " ^0.7.2"
2131passlib = " ^1.7.4"
22- pymysql = " ^1.1.1"
2332python-jose = " ^3.3.0"
2433python-multipart = " ^0.0.9"
2534redis = " ^5.0.8"
Original file line number Diff line number Diff line change 1+ {% if cookiecutter.database == 'MySQL' -%}
12aiomysql == 0.2.0
3+ pymysql == 1.1.1
4+ {% endif -%}
5+ {% if cookiecutter.database == 'PostgreSQL' -%}
6+ asyncpg == 0.29.0
7+ psycopg2-binary == 2.9.9
8+ {% endif -%}
9+ {% if cookiecutter.database == 'SQLite' -%}
10+ aiosqlite == 0.19.0
11+ {% endif -%}
212alembic == 1.13.2
313bcrypt == 4.2.0
414databases == 0.9.0
@@ -7,7 +17,6 @@ fastapi==^{{ cookiecutter.fastapi }}
717loguru == 0.7.2
818passlib == 1.7.4
919pydantic == 2.8.2
10- pymysql == 1.1.1
1120python-jose == 3.3.0
1221python-multipart == 0.0.9
1322redis == 5.0.8
You can’t perform that action at this time.
0 commit comments