about.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:CodeGra.de 作者: CodeGra-de 项目源码 文件源码
def about(
) -> JSONResponse[t.Mapping[str, t.Union[str, t.Mapping[str, bool]]]]:
    """Get the version and features of the currently running instance.

    .. :quickref: About; Get the version and features.

    :>json string version: The version of the running instance.
    :>json object features: A mapping from string to a boolean for every
        feature indicating if the current instance has it enabled.

    :returns: The mapping as described above.
    """
    features = {
        key: bool(value)
        for key, value in psef.app.config['FEATURES'].items()
    }
    return jsonify(
        {
            'version': psef.app.config['_VERSION'],
            'features': features,
        },
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号