Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add application drf for apigw-manager #178

Merged
merged 11 commits into from
Aug 13, 2024
2 changes: 1 addition & 1 deletion sdks/apigw-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ poetry.lock: pyproject.toml

.PHONY: requirements
requirements: poetry.lock
poetry export -f requirements.txt --without-hashes --extras demo --with dev --output requirements_tox.txt
poetry export -f requirements.txt --without-hashes --extras demo --extras drf --with dev --output requirements_tox.txt

README.rst: README.md
m2r --overwrite README.md
Expand Down
149 changes: 147 additions & 2 deletions sdks/apigw-manager/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion sdks/apigw-manager/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "apigw-manager"
version = "3.0.5"
version = "3.1.0"
description = "The SDK for managing blueking gateway resource."
readme = "README.md"
authors = ["blueking <[email protected]>"]
Expand Down Expand Up @@ -29,9 +29,14 @@ cryptography = { version = ">=3.1.1", optional = true }
packaging = { version = ">=20.4" }
PyMySQL = { version = "^1.0.2", optional = true }
kubernetes = { version = "*", optional = true }
# if want to upgrade this package, should upgrade python version first; 3.15.2 is not compatible with python 3.6/3.7
djangorestframework = { version = "<=3.15.1", optional = true }
# if want to upgrade this package, should upgrade python version first; 0.27.2 is not compatible with python 3.6
drf-spectacular = { version = "<=0.27.1", optional = true }

[tool.poetry.extras]
cryptography = ["cryptography", "pyjwt"]
drf = ["django", "cryptography", "pyjwt", "djangorestframework", "drf-spectacular"]
django = ["django", "pyjwt"]
demo = ["django-environ", "django", "PyMySQL", "pyjwt"]
kubernetes = ["kubernetes"]
Expand Down
8 changes: 7 additions & 1 deletion sdks/apigw-manager/requirements_tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ atomicwrites==1.4.0 ; python_full_version >= "3.6.1" and python_full_version < "
attrs==21.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
backcall==0.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
backports-entry-points-selectable==1.1.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
backports-zoneinfo==0.2.1 ; python_full_version >= "3.6.1" and python_version < "3.9"
bkapi-bk-apigateway==1.0.11 ; python_full_version >= "3.6.1" and python_version < "4.0"
bkapi-client-core==1.2.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
bleach==3.3.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Expand All @@ -21,7 +22,9 @@ decorator==5.0.9 ; python_full_version >= "3.6.1" and python_full_version < "4.0
distlib==0.3.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
django-environ==0.8.1 ; python_full_version >= "3.6.1" and python_version < "4"
django==3.2.12 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
djangorestframework==3.15.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
docutils==0.17.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
drf-spectacular==0.27.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
faker==14.2.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
filelock==3.0.12 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
future==0.18.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Expand All @@ -30,11 +33,13 @@ identify==2.2.11 ; python_full_version >= "3.6.1" and python_full_version < "4.0
idna==3.2 ; python_full_version >= "3.6.1" and python_version < "4.0"
importlib-metadata==4.6.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
importlib-resources==5.2.0 ; python_full_version >= "3.6.1" and python_version < "3.7"
inflection==0.5.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
iniconfig==1.1.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
ipython-genutils==0.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
ipython==7.16.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
jedi==0.17.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
jeepney==0.7.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and sys_platform == "linux"
jsonschema==3.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
keyring==23.0.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
kubernetes==24.2.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
m2r==0.2.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Expand All @@ -61,6 +66,7 @@ pygments==2.9.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.
pyjwt==2.1.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pymysql==1.0.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pyparsing==2.4.7 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pyrsistent==0.18.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pytest-cov==4.0.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pytest-django==4.5.2 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
pytest-mock==3.6.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Expand All @@ -77,7 +83,6 @@ requests==2.26.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
rfc3986==1.5.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
rich==12.0.1 ; python_version >= "3.7" and python_full_version < "3.8.0"
rsa==4.9 ; python_full_version >= "3.6.1" and python_version < "4"
ruff==0.1.6 ; python_version >= "3.7" and python_full_version < "3.8.0"
secretstorage==3.3.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and sys_platform == "linux"
setuptools==59.6.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
six==1.16.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
Expand All @@ -92,6 +97,7 @@ typed-ast==1.4.3 ; python_full_version >= "3.6.1" and python_version < "3.8"
types-pymysql==1.1.0.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
types-pyyaml==6.0.12.9 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
typing-extensions==3.10.0.0 ; python_full_version >= "3.6.1" and python_version < "4.0"
uritemplate==4.1.1 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
urllib3==1.26.6 ; python_full_version >= "3.6.1" and python_version < "4"
virtualenv==20.5.0 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
wcwidth==0.2.5 ; python_full_version >= "3.6.1" and python_full_version < "4.0.0"
Expand Down
16 changes: 7 additions & 9 deletions sdks/apigw-manager/src/apigw_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
"""
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
"""
# TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
# Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://opensource.org/licenses/MIT
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
8 changes: 8 additions & 0 deletions sdks/apigw-manager/src/apigw_manager/drf/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
# Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://opensource.org/licenses/MIT
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
Loading
Loading