Files
fastapi-best-architecture/backend/core/path_conf.py
T
Wu Clan f9ec9d5d56 Add code generator app (#318)
* 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
2024-07-10 12:12:29 +08:00

25 lines
693 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from pathlib import Path
# 获取项目根目录
# 或使用绝对路径,指到backend目录为止,例如windowsBasePath = 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')