Skip to main content

algo-backend-framework-python

功能概述

  • 配置
  • 错误码、异常、参数检验报错转换
  • 标准响应体、x-request-id
  • 日志框架支持:loguru、nb_log
  • 多进程prometheus指标
  • otel

分支规范

  • master分支: 归档分支
  • release/release-×.×.×: 发布分支,×.×.×为版本号;修改pyproject.toml中的version构建并发布包
  • dev分支: 开发分支;合并至release分支时,需要提mr,mr需要填写版本号和功能描述;需要充分自测和review之后才能合并至release
  • feat/feat-×××××: 功能分支;合并至dev时需要mr,mr需要填写功能名称和功能描述;新功能或较大重构需要建feat分支,较小的改动不必开feat分支

本地调试

本地开发需要打包验证,则先构建包(但不要发布),然后在本地目录离线安装

# 构建包
uv build
# 拷贝wheel包到本地测试目录下执行以下命令
uv add algo_backend_framework-*.*.*-py3-none-any.whl
# 调试时发现包有问题,只需要remove后重新打包,并重新add
uv remove algo-backend-framework

开发约定

  • 代码提交前进行sonar扫描和语法检查,并进行代码格式化
    uv run ruff format algo_backend/×××××
    
  • 子模块__init__.py文件需要声明包内暴露模块,不建议用户通过包内文件名导入,以减少后期微调重构引起的不兼容
  • 跨模块导入一律使用from algo_backend.× import 模块名的全限定包名,同级目录下导入从使用from . import

发布

  • 在release分支进行构建和推送
uv build
# 推送ctcdn nexus
uv publish --index ctcdn-pypi-upload
# 推送pypi
uv publish

Metadata

Release files for algo-backend-framework 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for algo-backend-framework 0.0.8
File Size Uploaded Provenance Actions
algo_backend_framework-0.0.8.tar.gz 20.3 kB Without provenance Details for algo_backend_framework-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algo-backend-framework 0.0.8
File Interpreter ABI Platform Actions
algo_backend_framework-0.0.8-py3-none-any.whl Python 3 none any Details for algo_backend_framework-0.0.8-py3-none-any.whl

Total release size: 51.9 kB

Release files / algo_backend_framework-0.0.8.tar.gz

Download URL algo_backend_framework-0.0.8.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
31d35caba30482fce27949a7b61bff0a88814ab6164bcee6dca978ad84dc0e58
BLAKE2b-256 checksum
How to use checksums
9c21cb12af26a455642cff87dd3d38325d86a8cbe9cf12a503ff0ca40990f890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.10

Release files / algo_backend_framework-0.0.8-py3-none-any.whl

Download URL algo_backend_framework-0.0.8-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
363d9f3ab561c7ef2611074f6b0203980bed0136f36007fc645c3009bc546f7d
BLAKE2b-256 checksum
How to use checksums
8f1a537a6422d2c0901850193d769b080ef12a4d0797bd9974bc1e0393b96490
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.10

Security for algo-backend-framework 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page