Skip to content

Commit 84471f7

Browse files
authored
add application drf for apigw-manager (TencentBlueKing#178)
1 parent 70c40e8 commit 84471f7

31 files changed

Lines changed: 1947 additions & 23 deletions

sdks/apigw-manager/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ poetry.lock: pyproject.toml
2222

2323
.PHONY: requirements
2424
requirements: poetry.lock
25-
poetry export -f requirements.txt --without-hashes --extras demo --with dev --output requirements_tox.txt
25+
poetry export -f requirements.txt --without-hashes --extras demo --extras drf --with dev --output requirements_tox.txt
2626

2727
README.rst: README.md
2828
m2r --overwrite README.md

sdks/apigw-manager/poetry.lock

Lines changed: 147 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/apigw-manager/pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "apigw-manager"
3-
version = "3.0.5"
3+
version = "3.1.0"
44
description = "The SDK for managing blueking gateway resource."
55
readme = "README.md"
66
authors = ["blueking <blueking@tencent.com>"]
@@ -29,9 +29,14 @@ cryptography = { version = ">=3.1.1", optional = true }
2929
packaging = { version = ">=20.4" }
3030
PyMySQL = { version = "^1.0.2", optional = true }
3131
kubernetes = { version = "*", optional = true }
32+
# if want to upgrade this package, should upgrade python version first; 3.15.2 is not compatible with python 3.6/3.7
33+
djangorestframework = { version = "<=3.15.1", optional = true }
34+
# if want to upgrade this package, should upgrade python version first; 0.27.2 is not compatible with python 3.6
35+
drf-spectacular = { version = "<=0.27.1", optional = true }
3236

3337
[tool.poetry.extras]
3438
cryptography = ["cryptography", "pyjwt"]
39+
drf = ["django", "cryptography", "pyjwt", "djangorestframework", "drf-spectacular"]
3540
django = ["django", "pyjwt"]
3641
demo = ["django-environ", "django", "PyMySQL", "pyjwt"]
3742
kubernetes = ["kubernetes"]

sdks/apigw-manager/requirements_tox.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ atomicwrites==1.4.0 ; python_full_version >= "3.6.1" and python_full_version < "
44
attrs==21.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
55
backcall==0.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
66
backports-entry-points-selectable==1.1.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
7+
backports-zoneinfo==0.2.1 ; python_full_version >= "3.6.1" and python_version < "3.9"
78
bkapi-bk-apigateway==1.0.11 ; python_full_version >= "3.6.1" and python_version < "4.0"
89
bkapi-client-core==1.2.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
910
bleach==3.3.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
@@ -21,7 +22,9 @@ decorator==5.0.9 ; python_full_version >= "3.6.1" and python_full_version < "4.0
2122
distlib==0.3.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
2223
django-environ==0.8.1 ; python_full_version >= "3.6.1" and python_version < "4"
2324
django==3.2.12 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
25+
djangorestframework==3.15.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
2426
docutils==0.17.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
27+
drf-spectacular==0.27.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
2528
faker==14.2.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
2629
filelock==3.0.12 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
2730
future==0.18.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
@@ -30,11 +33,13 @@ identify==2.2.11 ; python_full_version >= "3.6.1" and python_full_version < "4.0
3033
idna==3.2 ; python_full_version >= "3.6.1" and python_version < "4.0"
3134
importlib-metadata==4.6.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3235
importlib-resources==5.2.0 ; python_full_version >= "3.6.1" and python_version < "3.7"
36+
inflection==0.5.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3337
iniconfig==1.1.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3438
ipython-genutils==0.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3539
ipython==7.16.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3640
jedi==0.17.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3741
jeepney==0.7.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and sys_platform == "linux"
42+
jsonschema==3.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3843
keyring==23.0.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
3944
kubernetes==24.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
4045
m2r==0.2.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
@@ -61,6 +66,7 @@ pygments==2.9.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.
6166
pyjwt==2.1.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
6267
pymysql==1.0.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
6368
pyparsing==2.4.7 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
69+
pyrsistent==0.18.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
6470
pytest-cov==4.0.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
6571
pytest-django==4.5.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
6672
pytest-mock==3.6.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
@@ -77,7 +83,6 @@ requests==2.26.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
7783
rfc3986==1.5.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
7884
rich==12.0.1 ; python_version >= "3.7" and python_full_version < "3.8.0"
7985
rsa==4.9 ; python_full_version >= "3.6.1" and python_version < "4"
80-
ruff==0.1.6 ; python_version >= "3.7" and python_full_version < "3.8.0"
8186
secretstorage==3.3.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and sys_platform == "linux"
8287
setuptools==59.6.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
8388
six==1.16.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
@@ -92,6 +97,7 @@ typed-ast==1.4.3 ; python_full_version >= "3.6.1" and python_version < "3.8"
9297
types-pymysql==1.1.0.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
9398
types-pyyaml==6.0.12.9 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
9499
typing-extensions==3.10.0.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
100+
uritemplate==4.1.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
95101
urllib3==1.26.6 ; python_full_version >= "3.6.1" and python_version < "4"
96102
virtualenv==20.5.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
97103
wcwidth==0.2.5 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# -*- coding: utf-8 -*-
2-
"""
3-
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
4-
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
5-
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
7-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8-
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9-
* specific language governing permissions and limitations under the License.
10-
"""
2+
# TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
3+
# Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at http://opensource.org/licenses/MIT
6+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
7+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
8+
# specific language governing permissions and limitations under the License.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- coding: utf-8 -*-
2+
# TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
3+
# Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at http://opensource.org/licenses/MIT
6+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
7+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
8+
# specific language governing permissions and limitations under the License.

0 commit comments

Comments
 (0)