A Django application for developing BK-PaaS add-on services.
Project description
Paas Service
蓝鲸 PaaS 平台增强服务框架
版本历史
详见 CHANGES.md
。
使用指南
- 更新 settings:
INSTALLED_APPS = [
...
'paas_service',
...
]
MIDDLEWARE = [
...
'paas_service.auth.middleware.VerifiedClientMiddleware',
...
]
# 数据库敏感字段加密 Key
BKKRILL_ENCRYPT_SECRET_KEY = base64.b64encode(b'\x01' * 32)
# 与 PaaS 平台通信的 JWT 信息
PAAS_SERVICE_JWT_CLIENTS = [
{
"iss": "paas-v3",
"key": "123..........",
"algorithm": "HS256",
},
]
# 增强服务供应商类
PAAS_SERVICE_PROVIDER_CLS = "svc_xxx.vendor.provider.Provider"
# 增强服务实例信息渲染函数
PAAS_SERVICE_SVC_INSTANCE_RENDER_FUNC = "svc_xxx.vendor.render.render_instance_data"
# 设置语言,注意:目前国际化只支持: 简体中文 和 English
LANGUAGE_CODE = 'zh-cn'
LANGUAGES = [("zh-cn", "简体中文"), ("en", "English")]
- 单元测试
首先,安装 pytest、pytest-django。
然后执行 make test
运行所有单元测试。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paas_service-2.0.0.tar.gz
(19.5 kB
view details)
Built Distribution
File details
Details for the file paas_service-2.0.0.tar.gz
.
File metadata
- Download URL: paas_service-2.0.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3997bac3d6231866b7587722b82109b5957466fe1565539975844cbd59a4eaba |
|
MD5 | e2f3afaecd4cc9b7770577f1d50344c5 |
|
BLAKE2b-256 | 1fc3273de7e5d783bbbe7a41b00859a4bef27bd94bcea0a72c0d15c342dea863 |
File details
Details for the file paas_service-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: paas_service-2.0.0-py3-none-any.whl
- Upload date:
- Size: 42.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a6f6d1b8505864c6eb538c1a6c7b53bc814f4a081fb13de0e73bbc4a13b843 |
|
MD5 | 6ae531326c793396059ba7673c4061ca |
|
BLAKE2b-256 | 004778150fee679c6a3fd5cec8149a9a9ff96292394af7835355d8bfd2cfbd92 |