bk-resource 0.4.12__py3-none-any.whl → 0.4.13__py3-none-any.whl

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.
@@ -42,9 +42,17 @@ class ResourceFinder(BaseFinder):
42
42
  app_names = set(app_names)
43
43
  app_configs = [ac for ac in app_configs if ac.name in app_names]
44
44
 
45
+ # 获取需要排除的应用列表
46
+ exclude_apps_env = bk_resource_settings.RESOURCE_EXCLUDE_APPS
47
+ exclude_apps = set()
48
+ if exclude_apps_env:
49
+ exclude_apps = set(app.strip() for app in exclude_apps_env.split(',') if app.strip())
50
+
45
51
  for app_config in app_configs:
46
- self.resource_path += self.find(app_config.path, root_path=os.path.dirname(app_config.path))
47
- app_path_directories.append(app_config.path)
52
+ # 检查当前应用是否在排除列表中
53
+ if app_config.name not in exclude_apps:
54
+ self.resource_path += self.find(app_config.path, root_path=os.path.dirname(app_config.path))
55
+ app_path_directories.append(app_config.path)
48
56
 
49
57
  for path in RESOURCE_DIRS:
50
58
  search_path = os.path.join(settings.BASE_DIR, path)
bk_resource/settings.py CHANGED
@@ -50,6 +50,7 @@ class BkResourceSettings:
50
50
  REQUEST_BKAPI_COOKIE_FIELDS=["blueking_language", "django_language"],
51
51
  REQUEST_LANGUGAE_HEADER_KEY="blueking-language",
52
52
  RESOURCE_BULK_REQUEST_PROCESSES=None,
53
+ RESOURCE_EXCLUDE_APPS="",
53
54
  )
54
55
 
55
56
  LAZY_IMPORT_SETTINGS = (
@@ -1,25 +1,33 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: bk_resource
3
- Version: 0.4.12
3
+ Version: 0.4.13
4
4
  Summary: Bk Resource
5
5
  Home-page: https://bk.tencent.com
6
6
  Author: blueking
7
7
  Author-email: blueking@tencent.com
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE.txt
10
- Requires-Dist: blueapps >=4.12.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 >=4.4.0
10
+ Requires-Dist: blueapps>=4.12.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>=4.4.0
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: description
21
+ Dynamic: description-content-type
22
+ Dynamic: home-page
23
+ Dynamic: license-file
24
+ Dynamic: requires-dist
25
+ Dynamic: summary
18
26
 
19
27
  ![logo.png](assests/logo.png)
20
28
 
21
29
  [![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.12-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/releases)
30
+ [![Release Version](https://img.shields.io/badge/release-0.4.13-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/releases)
23
31
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TencentBlueKing/bk-resource/pulls)
24
32
  [![codecov](https://codecov.io/gh/TencentBlueKing/bk-resource/branch/main/graph/badge.svg)](https://codecov.io/gh/TencentBlueKing/bk-resource)
25
33
  [![Unittest Py3](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml/badge.svg)](https://github.com/TencentBlueKing/bk-resource/actions/workflows/unittest.yml)
@@ -4,7 +4,7 @@ bk_resource/base.py,sha256=ABs1QI0isexmIP7LQJrQ5ZkzmbqRkVVhgsQfxV45nJA,14062
4
4
  bk_resource/exceptions.py,sha256=lrO1pHGzy8P0AvdCYMk1SR-qKCy-bbPNapZcINBw9c0,3883
5
5
  bk_resource/routers.py,sha256=tF1n15vj64v3Y-8IopOnLi8PDR6Z2p7pZRQAmtHXlzk,2766
6
6
  bk_resource/serializers.py,sha256=Az_2Qsp_5gUrhU_0iZS45komm5upU5u1UpNE-ArSX4s,2690
7
- bk_resource/settings.py,sha256=QCGKeetjdDIWHHu1_93MKPeJ_VpGlQXvW7gpln1pGlU,3827
7
+ bk_resource/settings.py,sha256=T4H5MXspuk6IzMwxrzDcUVT9LfmkJ8DiL_47-yF2qqA,3861
8
8
  bk_resource/tasks.py,sha256=OeBy41GfSDNL_0adGeKBG6LlVRqNUfP7KzXe7pxpr3I,4090
9
9
  bk_resource/tools.py,sha256=fPmiDNxh2FWo5Yo7CXtvYyHxyG3_JrGs5wYZMaVFAhE,8166
10
10
  bk_resource/viewsets.py,sha256=QhCIHiJ227N8njqr6bSJZxP5eBh3z5Q4u1dGzBjHHXs,11614
@@ -29,7 +29,7 @@ bk_resource/locale/zh_CN/LC_MESSAGES/django.mo,sha256=3GCXKryGcXqFnoIDIDaz97SBpl
29
29
  bk_resource/locale/zh_CN/LC_MESSAGES/django.po,sha256=84sz1mKUWfOv7S2yYn1ozhdW4Ie2stMalQxBHT0Gt2g,4398
30
30
  bk_resource/management/__init__.py,sha256=zTvK51uqIT4Sy_bCfeXQbIyI-SskbMWjUfVNrQzE-0k,891
31
31
  bk_resource/management/exceptions.py,sha256=0ADfQxZnNgE4TSxZmDTMG-1L_H39fPjQRyEgn_Er1Kk,1110
32
- bk_resource/management/finder.py,sha256=fwkkdpoZYdZE3uheiQu6OluHJ8anv4ASbykHAN_elTA,4859
32
+ bk_resource/management/finder.py,sha256=oEoRsE5hdCOwCpfOuUDxrMfk8aVKO81hU8B7fwubDLc,5247
33
33
  bk_resource/management/root.py,sha256=chD_WFz1o99hoBW9qmwvehyGgE2KKOiiijuMg9EfAoo,10304
34
34
  bk_resource/management/stub_file_generator.py,sha256=NHSEuYY2SzwvrVA9ewgzqh7WR7_x6vSYIshR1IED2hI,4974
35
35
  bk_resource/management/commands/__init__.py,sha256=zTvK51uqIT4Sy_bCfeXQbIyI-SskbMWjUfVNrQzE-0k,891
@@ -48,8 +48,8 @@ bk_resource/utils/request_log.py,sha256=VMSFu0c8e53e7TUFJtdKXpkM0_pl-mk1UaFFdrGY
48
48
  bk_resource/utils/text.py,sha256=exu7gEFANcU6apQOut_1VSzoddOvcKR3CXEF1Z19M4Y,3313
49
49
  bk_resource/utils/thread_backend.py,sha256=AdMWzXreFARinPdDaMiRJwwxSWL1EB4MUSz1Q7kYz90,5017
50
50
  bk_resource/utils/time_tools.py,sha256=y-eP-6Gu5ur3ET0bOp2ML8Z0HtrguvTPlbsSA1dNhWU,10967
51
- bk_resource-0.4.12.dist-info/LICENSE.txt,sha256=dnlkOMrlbRgRXlBt-a_QF6cs1MFG6WYmcotYbI6_gpo,859
52
- bk_resource-0.4.12.dist-info/METADATA,sha256=wKkceKDIj65xMUI_yY8HkXdgFydRkG1mG35rsqNYS04,5501
53
- bk_resource-0.4.12.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
54
- bk_resource-0.4.12.dist-info/top_level.txt,sha256=UJxO1tbrqlmnvSTYCLoqg39_gvBesvjp3CcGEPjzXY4,12
55
- bk_resource-0.4.12.dist-info/RECORD,,
51
+ bk_resource-0.4.13.dist-info/licenses/LICENSE.txt,sha256=dnlkOMrlbRgRXlBt-a_QF6cs1MFG6WYmcotYbI6_gpo,859
52
+ bk_resource-0.4.13.dist-info/METADATA,sha256=UyK0j0JLEAkNZw3yU2wdBaDtn--aSmR2ROaKZfbel7Y,5667
53
+ bk_resource-0.4.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ bk_resource-0.4.13.dist-info/top_level.txt,sha256=UJxO1tbrqlmnvSTYCLoqg39_gvBesvjp3CcGEPjzXY4,12
55
+ bk_resource-0.4.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5