@@ -6,48 +6,23 @@ title: 插件开发
66
77:::: steps
88
9- 1 . clone 最新 fba 项目到本地并配置好开发环境
10- 2 . 根据 [ 插件目录结构 ] ( #插件目录结构 )
11- 开发插件,在开始前,开发者还需了解 [ 插件分类 ] ( #插件分类 ) 、 [ 插件路由结构 ] ( #插件路由结构 ) 、 [ 插件配置 ] ( #插件配置 )
12- 3 . 完成插件开发
13- 4 . 插件分享 <Badge type =" warning " text =" 可选 " />
9+ 1 . 拉取最新的 fba 项目到本地并配置好开发环境
10+ 2 . 通过 [ 插件分类 ] ( #插件分类 ) 、 [ 插件路由结构 ] ( #插件路由结构 ) 、 [ 插件配置 ] ( #插件配置 ) 了解插件系统的运作机制
11+ 3 . 根据 [ 插件目录结构 ] ( #插件目录结构 ) 进行插件开发
12+ 4 . 完成插件开发
13+ 5 . 插件分享 <Badge type =" warning " text =" 可选 " />
1414
1515 使用插件模板仓库 [ fba_plugin_template] ( https://github.com/fastapi-practices/fba_plugin_template )
1616 创建个人仓库,并将插件代码上传到个人仓库
1717
1818 ::: warning
19- 请不要将插件代码以 PR 的方式进行提交!它永远不会被接受!
19+ 请不要将插件代码以 PR 的方式进行提交!
2020 :::
2121
22- 5 . [ 申请发布插件] ( publish.md ) <Badge type =" warning " text =" 可选 " />
22+ 6 . [ 申请发布插件] ( publish.md ) <Badge type =" warning " text =" 可选 " />
2323
2424::::
2525
26- ### 插件目录结构
27-
28- ::: file-tree
29-
30- - backend 固定目录 <Badge type =" danger " text =" 必须 " />
31- - plugin 固定目录 <Badge type =" danger " text =" 必须 " />
32- - xxx 插件名 <Badge type =" danger " text =" 必须 " />
33- - api/ 接口 <Badge type =" danger " text =" 必须 " />
34- - crud/ CRUD <Badge type =" warning " text =" 非必须 " />
35- - model/ 模型 <Badge type =" warning " text =" 非必须 " />
36- - \_\_ init__ .py 在此文件内导入所有模型类 <Badge type =" danger " text =" 必须 " />
37- - …
38- - schema/ 数据传输 <Badge type =" warning " text =" 非必须 " />
39- - service/ 服务 <Badge type =" warning " text =" 非必须 " />
40- - utils/ 工具包 <Badge type =" warning " text =" 非必须 " />
41- - \_\_ init__ .py 作为 python 包保留 <Badge type =" danger " text =" 必须 " />
42- - ...
43- - conf.py 常量配置 <Badge type =" warning " text =" 非必须 " />
44- - plugin.toml 插件配置文件 <Badge type =" danger " text =" 必须 " />
45- - README.md 插件使用说明 <Badge type =" danger " text =" 必须 " />
46- - requirements.txt 依赖包文件 <Badge type =" warning " text =" 非必须 " />;
47- 如果插件需要安装依赖,则为 <Badge type =" danger " text =" 必须 " />
48-
49- :::
50-
5126### 插件分类
5227
5328与插件相关的部分文档中,可能高频次出现以下两个词
@@ -110,6 +85,31 @@ tags = ''
11085
11186:::
11287
88+ ### 插件目录结构
89+
90+ ::: file-tree
91+
92+ - backend 固定目录 <Badge type =" danger " text =" 必须 " />
93+ - plugin 固定目录 <Badge type =" danger " text =" 必须 " />
94+ - xxx 插件名 <Badge type =" danger " text =" 必须 " />
95+ - api/ 接口 <Badge type =" danger " text =" 必须 " />
96+ - crud/ CRUD <Badge type =" warning " text =" 非必须 " />
97+ - model/ 模型 <Badge type =" warning " text =" 非必须 " />
98+ - \_\_ init\_\_ .py 在此文件内导入所有模型类 <Badge type =" danger " text =" 必须 " />
99+ - …
100+ - schema/ 数据传输 <Badge type =" warning " text =" 非必须 " />
101+ - service/ 服务 <Badge type =" warning " text =" 非必须 " />
102+ - utils/ 工具包 <Badge type =" warning " text =" 非必须 " />
103+ - \_\_ init\_\_ .py 作为 python 包保留 <Badge type =" danger " text =" 必须 " />
104+ - ...
105+ - conf.py 插件配置 <Badge type =" warning " text =" 非必须 " />
106+ - plugin.toml 插件配置文件 <Badge type =" danger " text =" 必须 " />
107+ - README.md 插件使用说明 <Badge type =" danger " text =" 必须 " />
108+ - requirements.txt 依赖包文件 <Badge type =" warning " text =" 非必须 " />;
109+ 如果插件需要安装依赖,则为 <Badge type =" danger " text =" 必须 " />
110+
111+ :::
112+
113113## 前端
114114
115115暂无此计划...
0 commit comments