mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-23 13:33:08 +00:00
* Add code generator app * Define the generator interfaces * Update the name of the template files * update lock hash * update route and schemas * update gen code structure * add some gen codes * upgrade SQLAlchemy to release * update template util * Fix lint error * Add template rendering code * Add gen model code * Fix gen model table * Update business model column naming * Update any route * Fix api ninja args * Update gen business model * Fix interface services logic * Fix template render * Add more code template * Add model auto gen template * Fix model type map style * Update schema and model templates * Update gen_model schema * Fix model template if * Update have_datetime_column field from gen_model to gen_business table * Update the name of the zip * Update model template vars * Add download generate code * Add preview code encoding * Update service code template * fix lint * Update github auth tag * Update requirements * Add code generation write * Update generate interface and zip conf * Optimize templates details * Update model relation column conf * Add import tables module * Add get all databases interface * Fix get tables interface * Bump pydantic to 2.8.1 * Upgrading lint dependencies * Add import business and model implement * Split import database execution code * Update text SQL execution to prevent SQL injection * Optimize schema name generation * clean code * Update create tables sql scripts * Update import sql query conditions * Add todo comments * Mark business creation interface * Update features in README
25 lines
693 B
Python
25 lines
693 B
Python
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
import os
|
||
|
||
from pathlib import Path
|
||
|
||
# 获取项目根目录
|
||
# 或使用绝对路径,指到backend目录为止,例如windows:BasePath = D:\git_project\fastapi_mysql\backend
|
||
BasePath = Path(__file__).resolve().parent.parent
|
||
|
||
# alembic 迁移文件存放路径
|
||
ALEMBIC_Versions_DIR = os.path.join(BasePath, 'alembic', 'versions')
|
||
|
||
# 日志文件路径
|
||
LOG_DIR = os.path.join(BasePath, 'log')
|
||
|
||
# 离线 IP 数据库路径
|
||
IP2REGION_XDB = os.path.join(BasePath, 'static', 'ip2region.xdb')
|
||
|
||
# 挂载静态目录
|
||
STATIC_DIR = os.path.join(BasePath, 'static')
|
||
|
||
# jinja2 模版文件路径
|
||
JINJA2_TEMPLATE_DIR = os.path.join(BasePath, 'templates')
|