ext_core.py 文件源码

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

项目:repocribro 作者: MarekSuchanek 项目源码 文件源码
def make_githup_api_factory(cfg):
    """Simple factory for making the GitHub API client factory

    :param cfg: Configuration of the application
    :type cfg: ``configparser.ConfigParser``
    :return: GitHub API client factory
    :rtype: ``function``
    """

    def github_api_factory(token=None, session=None):
        return GitHubAPI(
            cfg.get('github', 'client_id'),
            cfg.get('github', 'client_secret'),
            cfg.get('github', 'webhooks_secret'),
            session=session,
            token=token
        )

    return github_api_factory
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号