Skip to main content

A Django application for developing BK-PaaS add-on services.

Project description

Paas Service

蓝鲸 PaaS 平台增强服务框架

版本历史

详见 CHANGES.md

使用指南

  1. 更新 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")]
  1. 单元测试

首先,安装 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.2.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paas_service-2.0.2-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file paas_service-2.0.2.tar.gz.

File metadata

  • Download URL: paas_service-2.0.2.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for paas_service-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f2d073d5f834c0455e5d55f25d938b7dc406059e9097ece556ce1c04bda6a7b0
MD5 5fa61fea726236e6029a8d7272c4607f
BLAKE2b-256 cfa511b7b631ae8cb36d5a0920a7df312be35270c0fd055cf87790f0f1e7ccd6

See more details on using hashes here.

File details

Details for the file paas_service-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: paas_service-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for paas_service-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8eb800eb49709e8b2a99109db436d5f55da7c02ff8033e1e0341aba1553e54f
MD5 fc72ca6a7b398f0130b3ef9e42dfcb0e
BLAKE2b-256 4e687699a646913fed3ced24cf623461d72de97f4b7a7fee5823e217c96e0d9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page