会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
BOYE
Believe in yourself,Nothing is impossible
博客园
首页
新随笔
新文章
联系
管理
订阅
上一页
1
2
3
4
5
6
7
···
32
下一页
2024年10月17日
flask 登录认证
摘要: #!/usr/bin/env python # encoding: utf-8 #pip install flask-login import datetime from flask import Flask, Blueprint,session, redirect, url_for, render
阅读全文
posted @ 2024-10-17 17:21 boye169
阅读(28)
评论(0)
推荐(0)
2024年10月11日
Flask-SQLAlchemy
摘要: from flask import Flask, url_for, request, redirect, render_template from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) # 设置数据库连接地址 DB_URI
阅读全文
posted @ 2024-10-11 17:40 boye169
阅读(26)
评论(0)
推荐(0)
2024年10月10日
python 图片压缩
摘要: ''' pip install pillow ''' from io import BytesIO from PIL import Image def pic_compress(pic_path, out_path, target_size, quality=90, step=5): # 读取图片b
阅读全文
posted @ 2024-10-10 15:48 boye169
阅读(30)
评论(0)
推荐(0)
2024年9月23日
python jwt加密与解密
摘要: 安装 pip install PyJWT example import datetime import jwt #pip install PyJWT # PyJWT-2.8.0 secret_key="test" payload = { 'user_id': 12345, 'username': '
阅读全文
posted @ 2024-09-23 16:28 boye169
阅读(129)
评论(0)
推荐(0)
2024年9月5日
多个装饰器修改一个函数
摘要: def outter_1(func1): def inner_1(*args, **kwargs): # 使用不定长参数 print("inner_1内容") func1(*args, **kwargs) print("第一个装饰器 1") return inner_1 def outter_2(f
阅读全文
posted @ 2024-09-05 10:48 boye169
阅读(15)
评论(0)
推荐(0)
python 装饰器类
摘要: from functools import wraps class logit(object): def __init__(self, logfile='out.log'): self.logfile = logfile def __call__(self, func): @wraps(func)
阅读全文
posted @ 2024-09-05 10:45 boye169
阅读(13)
评论(0)
推荐(0)
python 带参数的装饰器
摘要: from functools import wraps def logit(logfile='out.log'): def logging_decorator(func): @wraps(func) def wrapped_function(*args, **kwargs): log_string
阅读全文
posted @ 2024-09-05 10:43 boye169
阅读(33)
评论(0)
推荐(0)
2024年8月21日
python flask 定时器
摘要: 安装 pip install flaskpip install flask_apscheduler -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn 使用 方法一:使用 Conf
阅读全文
posted @ 2024-08-21 17:42 boye169
阅读(53)
评论(0)
推荐(0)
2024年8月12日
使用Vite+TS+Antd构建React项目
摘要: 安装Vite npm install -g vite #yarn global add vite 创建React项目 vite create my-react-app --template react-ts 安装React Router npm install react-router-dom @t
阅读全文
posted @ 2024-08-12 18:25 boye169
阅读(225)
评论(0)
推荐(0)
2024年7月26日
python 自动获取浏览器下指定域名下的所有Cookie
摘要: import browsercookie def get_cookies(domain, browser='chrome'): browser_cookies = getattr(browsercookie, browser.lower())() domain_specified_cookies =
阅读全文
posted @ 2024-07-26 17:36 boye169
阅读(122)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
32
下一页
公告