bk-resource 0.4.8__tar.gz → 0.4.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. {bk_resource-0.4.8 → bk_resource-0.4.10}/MANIFEST.in +1 -0
  2. bk_resource-0.4.10/PKG-INFO +130 -0
  3. bk_resource-0.4.10/bk_resource.egg-info/PKG-INFO +130 -0
  4. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource.egg-info/SOURCES.txt +1 -0
  5. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource.egg-info/requires.txt +1 -1
  6. bk_resource-0.4.10/readme.md +112 -0
  7. {bk_resource-0.4.8 → bk_resource-0.4.10}/setup.py +8 -3
  8. bk_resource-0.4.8/PKG-INFO +0 -13
  9. bk_resource-0.4.8/bk_resource.egg-info/PKG-INFO +0 -13
  10. {bk_resource-0.4.8 → bk_resource-0.4.10}/LICENSE.txt +0 -0
  11. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/__init__.py +0 -0
  12. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/apps.py +0 -0
  13. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/base.py +0 -0
  14. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/__init__.py +0 -0
  15. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/__init__.py-tpl +0 -0
  16. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/admin.py-tpl +0 -0
  17. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/apps.py-tpl +0 -0
  18. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/migrations/__init__.py-tpl +0 -0
  19. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/models.py-tpl +0 -0
  20. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/resources.py-tpl +0 -0
  21. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/serializers.py-tpl +0 -0
  22. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/urls.py-tpl +0 -0
  23. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/conf/app_template/views.py-tpl +0 -0
  24. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/contrib/__init__.py +0 -0
  25. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/contrib/api.py +0 -0
  26. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/contrib/bk_api.py +0 -0
  27. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/contrib/cache.py +0 -0
  28. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/contrib/model.py +0 -0
  29. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/exceptions.py +0 -0
  30. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/locale/en/LC_MESSAGES/django.mo +0 -0
  31. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/locale/en/LC_MESSAGES/django.po +0 -0
  32. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/locale/zh_CN/LC_MESSAGES/django.mo +0 -0
  33. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/locale/zh_CN/LC_MESSAGES/django.po +0 -0
  34. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/__init__.py +0 -0
  35. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/commands/__init__.py +0 -0
  36. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/commands/generate_resource_stub_file.py +0 -0
  37. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/commands/start_resource.py +0 -0
  38. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/exceptions.py +0 -0
  39. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/finder.py +0 -0
  40. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/root.py +0 -0
  41. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/management/stub_file_generator.py +0 -0
  42. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/routers.py +0 -0
  43. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/serializers.py +0 -0
  44. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/settings.py +0 -0
  45. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/tasks.py +0 -0
  46. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/tools.py +0 -0
  47. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/__init__.py +0 -0
  48. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/cache.py +0 -0
  49. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/common_utils.py +0 -0
  50. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/factory.py +0 -0
  51. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/generators.py +0 -0
  52. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/inspectors.py +0 -0
  53. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/local.py +0 -0
  54. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/logger.py +0 -0
  55. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/request.py +0 -0
  56. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/request_log.py +0 -0
  57. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/text.py +0 -0
  58. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/thread_backend.py +0 -0
  59. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/utils/time_tools.py +0 -0
  60. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource/viewsets.py +0 -0
  61. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource.egg-info/dependency_links.txt +0 -0
  62. {bk_resource-0.4.8 → bk_resource-0.4.10}/bk_resource.egg-info/top_level.txt +0 -0
  63. {bk_resource-0.4.8 → bk_resource-0.4.10}/setup.cfg +0 -0
@@ -1,3 +1,4 @@
1
+ include readme.md
1
2
  recursive-include bk_resource/locale *.mo
2
3
  recursive-include bk_resource/locale *.po
3
4
  recursive-include bk_resource/conf/app_template *.py-tpl
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.1
2
+ Name: bk_resource
3
+ Version: 0.4.10
4
+ Summary: Bk Resource
5
+ Home-page: https://bk.tencent.com
6
+ Author: blueking
7
+ Author-email: blueking@tencent.com
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE.txt
10
+ Requires-Dist: blueapps<5,>=4.10.0
11
+ Requires-Dist: django>=3.2.18
12
+ Requires-Dist: djangorestframework>=3.12.0
13
+ Requires-Dist: drf-yasg>=1.20.0
14
+ Requires-Dist: pyinstrument>=3.4.2
15
+ Requires-Dist: arrow>=1.2.0
16
+ Requires-Dist: django-rest-framework-condition>=0.1.1
17
+ Requires-Dist: celery<5,>=4
18
+
19
+ ![logo.png](assests/logo.png)
20
+
21
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/bk-resource/blob/main/LICENSE.txt)
22
+ [![Release Version](https://img.shields.io/badge/release-0.4.10-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/releases)
23
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/pulls)
24
+ [![codecov](https://codecov.io/gh/TencentBlueKing/bk-resource/branch/main/graph/badge.svg)](https://codecov.io/gh/TencentBlueKing/bk-resource)
25
+ [![Unittest Py3](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml/badge.svg)](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml)
26
+
27
+ [(English Documents Available)](readme_en.md)
28
+
29
+ ## Overview
30
+
31
+ `bk_resource` 是一个基于 [Blueapps](https://github.com/TencentBlueKing/blueapps) 和 [Django Rest Framework](https://github.com/encode/django-rest-framework) 的脚手架,
32
+ 旨在帮助开发人员快速生成符合 [`12-factor`](https://12factor.net/) 规范的 WEB SaaS,并在`DDD`开发实践中方便地创建可扩展的领域服务
33
+
34
+ ## Features
35
+
36
+ - [Basic] 基于 `Django` 进行封装,生成标准 `swagger API`
37
+ - [Basic] 基于 `django-environ` 适配环境变量与 `.env` 配置
38
+ - [Basic] 支持基于 `PEP-621` 的全工具链 (mypy\isort\flake8\black) 配置方案
39
+ - [Basic] 支持代码规范类工具整合:`pre-commit`、`code-cc`
40
+ - [Resource] 集成 `bk_resource` 组织工程目录结构,通过 `Resource` 的方式声明业务逻辑
41
+ - [Resource] 支持 `ApiResource` / `BkApiResource` 调用第三方 `API` 接口
42
+
43
+ ## Getting started
44
+
45
+ ### Installation
46
+
47
+ 1. 安装`cruft`
48
+
49
+ ```bash
50
+ $ pip install cruft
51
+ ```
52
+
53
+ 2. 通过`cruft`脚本架生成项目
54
+
55
+ ```bash
56
+ $ cruft create https://github.com/TencentBlueKing/bk-resource.git --checkout main --directory template
57
+ ```
58
+
59
+ 3. 添加远程仓库地址并完成推送
60
+
61
+ ```bash
62
+ cd {{ project_id }}
63
+ git init
64
+ git add .
65
+ git commit -m "init repo"
66
+ git remote add origin {{ git_url }}
67
+ git push -u origin master
68
+ ```
69
+
70
+ ### 模板生命周期管理
71
+
72
+ 检查或更新模板前需确保本地代码已提交到 GIT 仓库
73
+
74
+ 1. 检查模板是否更新
75
+
76
+ ```bash
77
+ $ cruft check --checkout main
78
+ ```
79
+
80
+ 2. 合并模板到本地项目
81
+
82
+ ```bash
83
+ $ cruft update --checkout main
84
+ ```
85
+
86
+ ### Usage
87
+
88
+ - [快速开始](template/readme.md)
89
+ - [使用文档](docs/usage.md)
90
+
91
+ ### Domain Driven Design 开发实践
92
+
93
+ ![ddd](assests/framework.png)
94
+
95
+ - Api 交互层
96
+ 通过 UI Api 或者 Open Api 将服务暴露给用户,由对应的 Api 负责对应的业务逻辑串联。
97
+ - Scene 场景层
98
+ 在通过 Api 访问后端时,实际访问的是由 Resource 暴露的一个场景服务,通过场景服务串联领域层的业务逻辑。
99
+ - Domain 领域层
100
+ 领域层聚焦对应的细分模块,负责处理模块的具体业务逻辑,例如,在用户模块中,处理用户注册、登录、修改密码、重置密码等逻辑。
101
+ - Model 模型层
102
+ 在 MVC 框架中 (如 Django),将代码架构划分为 Model (模型),View (视图),Controller (控制器) 三层,View 用于界面展示,在前后端分离开发部署的实践中,已经不再由后端处理,后端只需要处理 Model & Controller。
103
+
104
+ ## Roadmap
105
+
106
+ - [版本日志](release.md)
107
+
108
+ ## Support
109
+
110
+ - [蓝鲸论坛](https://bk.tencent.com/s-mart/community)
111
+ - [蓝鲸 DevOps 在线视频教程](https://bk.tencent.com/s-mart/video/)
112
+ - [蓝鲸社区版交流群](https://jq.qq.com/?_wv=1027&k=5zk8F7G)
113
+
114
+ ## BlueKing Community
115
+
116
+ - [BK-CMDB](https://github.com/Tencent/bk-cmdb):蓝鲸配置平台(蓝鲸 CMDB)是一个面向资产及应用的企业级配置管理平台。
117
+ - [BK-CI](https://github.com/Tencent/bk-ci):蓝鲸持续集成平台是一个开源的持续集成和持续交付系统,可以轻松将你的研发流程呈现到你面前。
118
+ - [BK-BCS](https://github.com/Tencent/bk-bcs):蓝鲸容器管理平台是以容器技术为基础,为微服务业务提供编排管理的基础服务平台。
119
+ - [BK-PaaS](https://github.com/Tencent/bk-paas):蓝鲸 PaaS 平台是一个开放式的开发平台,让开发者可以方便快捷地创建、开发、部署和管理 SaaS 应用。
120
+ - [BK-SOPS](https://github.com/Tencent/bk-sops):标准运维(SOPS)是通过可视化的图形界面进行任务流程编排和执行的系统,是蓝鲸体系中一款轻量级的调度编排类 SaaS 产品。
121
+ - [BK-JOB](https://github.com/Tencent/bk-job) 蓝鲸作业平台(Job)是一套运维脚本管理系统,具备海量任务并发处理能力。
122
+
123
+ ## Contributing
124
+
125
+ 如果你有好的意见或建议,欢迎给我们提 Issues 或 Pull Requests,为蓝鲸开源社区贡献力量。
126
+ [腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。
127
+
128
+ ## License
129
+
130
+ 基于 MIT 协议, 详细请参考 [LICENSE](LICENSE.txt)
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.1
2
+ Name: bk_resource
3
+ Version: 0.4.10
4
+ Summary: Bk Resource
5
+ Home-page: https://bk.tencent.com
6
+ Author: blueking
7
+ Author-email: blueking@tencent.com
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE.txt
10
+ Requires-Dist: blueapps<5,>=4.10.0
11
+ Requires-Dist: django>=3.2.18
12
+ Requires-Dist: djangorestframework>=3.12.0
13
+ Requires-Dist: drf-yasg>=1.20.0
14
+ Requires-Dist: pyinstrument>=3.4.2
15
+ Requires-Dist: arrow>=1.2.0
16
+ Requires-Dist: django-rest-framework-condition>=0.1.1
17
+ Requires-Dist: celery<5,>=4
18
+
19
+ ![logo.png](assests/logo.png)
20
+
21
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/bk-resource/blob/main/LICENSE.txt)
22
+ [![Release Version](https://img.shields.io/badge/release-0.4.10-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/releases)
23
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/pulls)
24
+ [![codecov](https://codecov.io/gh/TencentBlueKing/bk-resource/branch/main/graph/badge.svg)](https://codecov.io/gh/TencentBlueKing/bk-resource)
25
+ [![Unittest Py3](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml/badge.svg)](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml)
26
+
27
+ [(English Documents Available)](readme_en.md)
28
+
29
+ ## Overview
30
+
31
+ `bk_resource` 是一个基于 [Blueapps](https://github.com/TencentBlueKing/blueapps) 和 [Django Rest Framework](https://github.com/encode/django-rest-framework) 的脚手架,
32
+ 旨在帮助开发人员快速生成符合 [`12-factor`](https://12factor.net/) 规范的 WEB SaaS,并在`DDD`开发实践中方便地创建可扩展的领域服务
33
+
34
+ ## Features
35
+
36
+ - [Basic] 基于 `Django` 进行封装,生成标准 `swagger API`
37
+ - [Basic] 基于 `django-environ` 适配环境变量与 `.env` 配置
38
+ - [Basic] 支持基于 `PEP-621` 的全工具链 (mypy\isort\flake8\black) 配置方案
39
+ - [Basic] 支持代码规范类工具整合:`pre-commit`、`code-cc`
40
+ - [Resource] 集成 `bk_resource` 组织工程目录结构,通过 `Resource` 的方式声明业务逻辑
41
+ - [Resource] 支持 `ApiResource` / `BkApiResource` 调用第三方 `API` 接口
42
+
43
+ ## Getting started
44
+
45
+ ### Installation
46
+
47
+ 1. 安装`cruft`
48
+
49
+ ```bash
50
+ $ pip install cruft
51
+ ```
52
+
53
+ 2. 通过`cruft`脚本架生成项目
54
+
55
+ ```bash
56
+ $ cruft create https://github.com/TencentBlueKing/bk-resource.git --checkout main --directory template
57
+ ```
58
+
59
+ 3. 添加远程仓库地址并完成推送
60
+
61
+ ```bash
62
+ cd {{ project_id }}
63
+ git init
64
+ git add .
65
+ git commit -m "init repo"
66
+ git remote add origin {{ git_url }}
67
+ git push -u origin master
68
+ ```
69
+
70
+ ### 模板生命周期管理
71
+
72
+ 检查或更新模板前需确保本地代码已提交到 GIT 仓库
73
+
74
+ 1. 检查模板是否更新
75
+
76
+ ```bash
77
+ $ cruft check --checkout main
78
+ ```
79
+
80
+ 2. 合并模板到本地项目
81
+
82
+ ```bash
83
+ $ cruft update --checkout main
84
+ ```
85
+
86
+ ### Usage
87
+
88
+ - [快速开始](template/readme.md)
89
+ - [使用文档](docs/usage.md)
90
+
91
+ ### Domain Driven Design 开发实践
92
+
93
+ ![ddd](assests/framework.png)
94
+
95
+ - Api 交互层
96
+ 通过 UI Api 或者 Open Api 将服务暴露给用户,由对应的 Api 负责对应的业务逻辑串联。
97
+ - Scene 场景层
98
+ 在通过 Api 访问后端时,实际访问的是由 Resource 暴露的一个场景服务,通过场景服务串联领域层的业务逻辑。
99
+ - Domain 领域层
100
+ 领域层聚焦对应的细分模块,负责处理模块的具体业务逻辑,例如,在用户模块中,处理用户注册、登录、修改密码、重置密码等逻辑。
101
+ - Model 模型层
102
+ 在 MVC 框架中 (如 Django),将代码架构划分为 Model (模型),View (视图),Controller (控制器) 三层,View 用于界面展示,在前后端分离开发部署的实践中,已经不再由后端处理,后端只需要处理 Model & Controller。
103
+
104
+ ## Roadmap
105
+
106
+ - [版本日志](release.md)
107
+
108
+ ## Support
109
+
110
+ - [蓝鲸论坛](https://bk.tencent.com/s-mart/community)
111
+ - [蓝鲸 DevOps 在线视频教程](https://bk.tencent.com/s-mart/video/)
112
+ - [蓝鲸社区版交流群](https://jq.qq.com/?_wv=1027&k=5zk8F7G)
113
+
114
+ ## BlueKing Community
115
+
116
+ - [BK-CMDB](https://github.com/Tencent/bk-cmdb):蓝鲸配置平台(蓝鲸 CMDB)是一个面向资产及应用的企业级配置管理平台。
117
+ - [BK-CI](https://github.com/Tencent/bk-ci):蓝鲸持续集成平台是一个开源的持续集成和持续交付系统,可以轻松将你的研发流程呈现到你面前。
118
+ - [BK-BCS](https://github.com/Tencent/bk-bcs):蓝鲸容器管理平台是以容器技术为基础,为微服务业务提供编排管理的基础服务平台。
119
+ - [BK-PaaS](https://github.com/Tencent/bk-paas):蓝鲸 PaaS 平台是一个开放式的开发平台,让开发者可以方便快捷地创建、开发、部署和管理 SaaS 应用。
120
+ - [BK-SOPS](https://github.com/Tencent/bk-sops):标准运维(SOPS)是通过可视化的图形界面进行任务流程编排和执行的系统,是蓝鲸体系中一款轻量级的调度编排类 SaaS 产品。
121
+ - [BK-JOB](https://github.com/Tencent/bk-job) 蓝鲸作业平台(Job)是一套运维脚本管理系统,具备海量任务并发处理能力。
122
+
123
+ ## Contributing
124
+
125
+ 如果你有好的意见或建议,欢迎给我们提 Issues 或 Pull Requests,为蓝鲸开源社区贡献力量。
126
+ [腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。
127
+
128
+ ## License
129
+
130
+ 基于 MIT 协议, 详细请参考 [LICENSE](LICENSE.txt)
@@ -1,5 +1,6 @@
1
1
  LICENSE.txt
2
2
  MANIFEST.in
3
+ readme.md
3
4
  setup.py
4
5
  bk_resource/__init__.py
5
6
  bk_resource/apps.py
@@ -1,4 +1,4 @@
1
- blueapps==4.7.1rc0
1
+ blueapps<5,>=4.10.0
2
2
  django>=3.2.18
3
3
  djangorestframework>=3.12.0
4
4
  drf-yasg>=1.20.0
@@ -0,0 +1,112 @@
1
+ ![logo.png](assests/logo.png)
2
+
3
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/TencentBlueKing/bk-resource/blob/main/LICENSE.txt)
4
+ [![Release Version](https://img.shields.io/badge/release-0.4.10-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/releases)
5
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/pulls)
6
+ [![codecov](https://codecov.io/gh/TencentBlueKing/bk-resource/branch/main/graph/badge.svg)](https://codecov.io/gh/TencentBlueKing/bk-resource)
7
+ [![Unittest Py3](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml/badge.svg)](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml)
8
+
9
+ [(English Documents Available)](readme_en.md)
10
+
11
+ ## Overview
12
+
13
+ `bk_resource` 是一个基于 [Blueapps](https://github.com/TencentBlueKing/blueapps) 和 [Django Rest Framework](https://github.com/encode/django-rest-framework) 的脚手架,
14
+ 旨在帮助开发人员快速生成符合 [`12-factor`](https://12factor.net/) 规范的 WEB SaaS,并在`DDD`开发实践中方便地创建可扩展的领域服务
15
+
16
+ ## Features
17
+
18
+ - [Basic] 基于 `Django` 进行封装,生成标准 `swagger API`
19
+ - [Basic] 基于 `django-environ` 适配环境变量与 `.env` 配置
20
+ - [Basic] 支持基于 `PEP-621` 的全工具链 (mypy\isort\flake8\black) 配置方案
21
+ - [Basic] 支持代码规范类工具整合:`pre-commit`、`code-cc`
22
+ - [Resource] 集成 `bk_resource` 组织工程目录结构,通过 `Resource` 的方式声明业务逻辑
23
+ - [Resource] 支持 `ApiResource` / `BkApiResource` 调用第三方 `API` 接口
24
+
25
+ ## Getting started
26
+
27
+ ### Installation
28
+
29
+ 1. 安装`cruft`
30
+
31
+ ```bash
32
+ $ pip install cruft
33
+ ```
34
+
35
+ 2. 通过`cruft`脚本架生成项目
36
+
37
+ ```bash
38
+ $ cruft create https://github.com/TencentBlueKing/bk-resource.git --checkout main --directory template
39
+ ```
40
+
41
+ 3. 添加远程仓库地址并完成推送
42
+
43
+ ```bash
44
+ cd {{ project_id }}
45
+ git init
46
+ git add .
47
+ git commit -m "init repo"
48
+ git remote add origin {{ git_url }}
49
+ git push -u origin master
50
+ ```
51
+
52
+ ### 模板生命周期管理
53
+
54
+ 检查或更新模板前需确保本地代码已提交到 GIT 仓库
55
+
56
+ 1. 检查模板是否更新
57
+
58
+ ```bash
59
+ $ cruft check --checkout main
60
+ ```
61
+
62
+ 2. 合并模板到本地项目
63
+
64
+ ```bash
65
+ $ cruft update --checkout main
66
+ ```
67
+
68
+ ### Usage
69
+
70
+ - [快速开始](template/readme.md)
71
+ - [使用文档](docs/usage.md)
72
+
73
+ ### Domain Driven Design 开发实践
74
+
75
+ ![ddd](assests/framework.png)
76
+
77
+ - Api 交互层
78
+ 通过 UI Api 或者 Open Api 将服务暴露给用户,由对应的 Api 负责对应的业务逻辑串联。
79
+ - Scene 场景层
80
+ 在通过 Api 访问后端时,实际访问的是由 Resource 暴露的一个场景服务,通过场景服务串联领域层的业务逻辑。
81
+ - Domain 领域层
82
+ 领域层聚焦对应的细分模块,负责处理模块的具体业务逻辑,例如,在用户模块中,处理用户注册、登录、修改密码、重置密码等逻辑。
83
+ - Model 模型层
84
+ 在 MVC 框架中 (如 Django),将代码架构划分为 Model (模型),View (视图),Controller (控制器) 三层,View 用于界面展示,在前后端分离开发部署的实践中,已经不再由后端处理,后端只需要处理 Model & Controller。
85
+
86
+ ## Roadmap
87
+
88
+ - [版本日志](release.md)
89
+
90
+ ## Support
91
+
92
+ - [蓝鲸论坛](https://bk.tencent.com/s-mart/community)
93
+ - [蓝鲸 DevOps 在线视频教程](https://bk.tencent.com/s-mart/video/)
94
+ - [蓝鲸社区版交流群](https://jq.qq.com/?_wv=1027&k=5zk8F7G)
95
+
96
+ ## BlueKing Community
97
+
98
+ - [BK-CMDB](https://github.com/Tencent/bk-cmdb):蓝鲸配置平台(蓝鲸 CMDB)是一个面向资产及应用的企业级配置管理平台。
99
+ - [BK-CI](https://github.com/Tencent/bk-ci):蓝鲸持续集成平台是一个开源的持续集成和持续交付系统,可以轻松将你的研发流程呈现到你面前。
100
+ - [BK-BCS](https://github.com/Tencent/bk-bcs):蓝鲸容器管理平台是以容器技术为基础,为微服务业务提供编排管理的基础服务平台。
101
+ - [BK-PaaS](https://github.com/Tencent/bk-paas):蓝鲸 PaaS 平台是一个开放式的开发平台,让开发者可以方便快捷地创建、开发、部署和管理 SaaS 应用。
102
+ - [BK-SOPS](https://github.com/Tencent/bk-sops):标准运维(SOPS)是通过可视化的图形界面进行任务流程编排和执行的系统,是蓝鲸体系中一款轻量级的调度编排类 SaaS 产品。
103
+ - [BK-JOB](https://github.com/Tencent/bk-job) 蓝鲸作业平台(Job)是一套运维脚本管理系统,具备海量任务并发处理能力。
104
+
105
+ ## Contributing
106
+
107
+ 如果你有好的意见或建议,欢迎给我们提 Issues 或 Pull Requests,为蓝鲸开源社区贡献力量。
108
+ [腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。
109
+
110
+ ## License
111
+
112
+ 基于 MIT 协议, 详细请参考 [LICENSE](LICENSE.txt)
@@ -16,15 +16,20 @@ We undertake not to change the open source license (MIT license) applicable
16
16
  to the current version of the project delivered to anyone in the future.
17
17
  """
18
18
 
19
- from setuptools import setup
19
+ from setuptools import setup, find_packages
20
+
21
+ with open("readme.md") as f:
22
+ readme = f.read()
20
23
 
21
24
  setup(
22
25
  name="bk_resource",
23
- version="0.4.8",
26
+ version="0.4.10",
24
27
  author="blueking",
25
28
  url="https://bk.tencent.com",
26
29
  author_email="blueking@tencent.com",
27
30
  description="Bk Resource",
31
+ long_description=readme,
32
+ long_description_content_type="text/markdown",
28
33
  packages=[
29
34
  "bk_resource",
30
35
  "bk_resource.conf",
@@ -34,7 +39,7 @@ setup(
34
39
  "bk_resource.utils",
35
40
  ],
36
41
  install_requires=[
37
- "blueapps==4.7.1rc0",
42
+ "blueapps>=4.10.0,<5",
38
43
  "django>=3.2.18",
39
44
  "djangorestframework>=3.12.0",
40
45
  "drf-yasg>=1.20.0",
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: bk_resource
3
- Version: 0.4.8
4
- Summary: Bk Resource
5
- Home-page: https://bk.tencent.com
6
- Author: blueking
7
- Author-email: blueking@tencent.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- License-File: LICENSE.txt
11
-
12
- UNKNOWN
13
-
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: bk-resource
3
- Version: 0.4.8
4
- Summary: Bk Resource
5
- Home-page: https://bk.tencent.com
6
- Author: blueking
7
- Author-email: blueking@tencent.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- License-File: LICENSE.txt
11
-
12
- UNKNOWN
13
-
File without changes
File without changes