Flask Admin
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
NoahLan 26ffde8db3 feat: postgresql支持 4 days ago
.codex/skills feat: postgresql支持 4 days ago
.cursor/rules feat: 修复优化一些逻辑; 自研一个上传算法; 修正gitignore; 切换开发环境为mysql; 4 months ago
.vscode feat: first commit. 7 months ago
copier-template feat: postgresql支持 4 days ago
docs feat: postgresql支持 4 days ago
iti feat: postgresql支持 4 days ago
migrations chore: excel导入导出模板 2 weeks ago
tests feat: postgresql支持 4 days ago
.env.example refactor: 重构框架项目,轻量微服务+copier+底包仓库依赖方式,而非代码直接进入 3 weeks ago
.gitignore chore: 部署、启动参数模板 1 week ago
LICENSE.txt feat: first commit. 7 months ago
README.md feat: postgresql支持 4 days ago
copier.yml feat: postgresql支持 4 days ago
pyproject.toml feat: postgresql支持 4 days ago

README.md

iTi-Flask

iTi-Flask 是 FastAPI 后端框架基座。

AI 修改框架代码或文档时优先读:

.codex/skills/iti-flask-framework/SKILL.md

它提供业务项目常用的通用能力:

  • FastAPI 应用工厂。
  • dataclass 配置和 .env 加载。
  • MySQL 默认数据库配置PostgreSQL 可选。
  • SQLAlchemy 2 和 Alembic。
  • JWT、权限依赖、错误处理、响应包装。
  • 用户 token / 服务 token 的统一 Actor 依赖。
  • 缓存、限流、事件总线。
  • 模块注册、权限元数据、菜单 seed 元数据。
  • 同步 HTTP 服务客户端。
  • 运行日志和审计事件 sender。
  • 单机轻量任务 runner。
  • /health/ready 健康检查。
  • Copier 业务项目模板。

系统业务不在框架内。 需要用户、角色、菜单、字典、文件、日志等能力时,业务项目额外注册 iti-system

安装

框架本地开发:

iticli install

Windows

iticli install

业务项目依赖:

dependencies = [
  "iti-flask @ git+https://git.noahlan.cn/iti-framework/iTi-Flask.git@v0.3.0",
]

应用工厂

from iti import create_app

from config import config
from my_app.modules.example import ExampleModule

app = create_app(
    config_mapping=config,
    modules=[ExampleModule()],
)

运行:

iticli run dev 8000

该命令会启动框架最小应用,可用于验证 /health/ready

业务项目生成

iticli create ../my-business-app
iticli create --database postgresql ../my-postgres-app
cd ../my-business-app
iticli init
iticli run dev 8000

同步框架依赖和模板骨架:

iticli update framework
iticli template check
iticli template update

iti-system

iticli create --with-system ../my-system-app
cd ../my-system-app
iticli init system

新生成的业务项目不再生成 app.shapp.cmd。 命令入口:

iticli help

发布框架:

iticli release
iticli release v0.3.0

Windows:

iticli release
iticli release v0.3.0

文档