![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
perry_yuan
这个作者很懒,什么都没留下…
展开
-
flask解决访问跨域问题
def allow_cookie_domain(func): """ 允许写cookie """ @wraps(func) def wrapper_fun(*args, **kwargs): """ wrapper_fun""" rst = make_response(func(*args, **kwargs)) http_origin = request.headers['Origin'] if 'Origin' in request原创 2021-03-27 10:32:18 · 130 阅读 · 0 评论 -
python 模糊删除redis的keys
python 模糊删除redis的keys def delete_redis_keys_by_match(match, count=20): """ redis模糊删除 :param match: 正则匹配规则 :param count: 每次查找数量 :return: 删除的个数 """ cursor = 0 flag = True keys_lists = [] while cursor > 0 or flag:原创 2021-01-09 09:56:55 · 388 阅读 · 0 评论