Skip to main content


Project description




# 业务异常类封装
class BusinessException(Exception):
    def __init__(self, data: str,msg: str): = data
        self.code = StatusCode.BUSINESSEXEC
        self.msg = msg
# 异常封装类
class SysException(Exception):
    def __init__(self, data: str,msg: str): = data
        self.code = StatusCode.SYSEXEC
        self.msg = msg


返回值信息统一封装 每个需要统一返回值的接口上,添加return_info_func装饰器即可。 return_info_func 中封装了异常处理,异常日志记录,操作日志记录等

字典统一处理 字典统一处理类,支持内存缓存,提供字典查询,清除缓存接口,未来可以支持redis缓存。

获取用户信息 提供接口从redis中获取当前用户信息

时间转换工具 时间转换工具

系统工具 操作系统参数的函数封装

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

qg_common_sdk-1.2.1-py3-none-any.whl (24.1 kB view hashes)

Uploaded py3

Supported by

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