client.py 文件源码

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

项目:ozelot 作者: trycs 项目源码 文件源码
def store_password(params, password):
        """Store the password for a database connection using :mod:`keyring`

        Use the ``user`` field as the user name and ``<host>:<driver>`` as service name.

        Args:
            params (dict): database configuration, as defined in :mod:`ozelot.config`
            password (str): password to store
        """
        user_name = params['user']
        service_name = params['host'] + ':' + params['driver']
        keyring.set_password(service_name=service_name,
                             username=user_name,
                             password=password)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号