摘要: 1. 准备环境 python3.11 -m venv venv source venv/*/activate pip install grpcio-tools #包含了grpcio和protobuf pip install types-protobuf grpc-stubs # 可选安装,用于myp 阅读全文
posted @ 2024-08-11 12:27 waketzheng 阅读(139) 评论(0) 推荐(0)
摘要: Spinner 中国有七彩云南,Python有七彩进度条rich.progress.Progress #!/usr/bin/env python from contextlib import contextmanager from typing import Generator # pip inst 阅读全文
posted @ 2024-07-25 18:37 waketzheng 阅读(185) 评论(0) 推荐(0)
摘要: 谷歌浏览器,已升级到最新版,uBlacklist插件也已安装 设置如下: 内容: baidu.com *://*.baidu.com/* tieba.baidu.com *.baidu.*/ 勾选要启用的搜索引擎: 启用后效果如下: 点开发现确实屏蔽掉某度了,感觉整个世界瞬间清净晒: 惜秦皇汉武,略 阅读全文
posted @ 2024-07-23 16:36 waketzheng 阅读(146) 评论(0) 推荐(0)
摘要: Code ts.py #!/usr/bin/env python """ FastDFS并发测试脚本 Usage:: $ python <me>.py 200 --show """ import functools import itertools import json import os imp 阅读全文
posted @ 2024-07-15 20:07 waketzheng 阅读(49) 评论(0) 推荐(0)
摘要: compile ./configure --prefix=/usr/local/nginx \ --with-http_v3_module \ --with-http_v2_module \ --with-cc-opt="-I../boringssl/include" \ --with-ld-opt 阅读全文
posted @ 2024-06-21 17:31 waketzheng 阅读(15) 评论(0) 推荐(0)
摘要: Install pip install 'fastapi-cdn-host>=0.5.2' Code import fastapi_cdn_host from fastapi import FastAPI app = FastAPI( openapi_url="/api/v1/openapi.jso 阅读全文
posted @ 2024-06-20 15:12 waketzheng 阅读(81) 评论(0) 推荐(0)
摘要: 祥开龙角应三农,小队旌旗猎猎风。 models.py class Group(Model): id = IntField(pk=True) name = CharField(max_length=10) class User(Model): id = IntField(pk=True) group 阅读全文
posted @ 2024-06-13 15:53 waketzheng 阅读(530) 评论(0) 推荐(0)
摘要: 网上比较容易找到的是pip install git+https://github.com/waketzheng/fastapi-cdn-host.git这种方式 如果电脑未配置或没启用外网加速器,这种方式简直慢得像蜗牛,改用ssh则会块很多很多: 一般情况 pip install git+ssh:/ 阅读全文
posted @ 2024-05-31 22:58 waketzheng 阅读(289) 评论(0) 推荐(0)
摘要: Install 直接pip安装,需要Python3.10+ pip install fastdfs-client Initial client 可以用其他教程的client.conf配置文件的方式,也可以直接传入ip列表进行初始化 from fastdfs_client import Fastdfs 阅读全文
posted @ 2024-05-15 22:30 waketzheng 阅读(190) 评论(0) 推荐(0)
摘要: utils.py: import functools import re from datetime import datetime, timedelta from typing import Union # pip install python-dateutil from dateutil imp 阅读全文
posted @ 2024-03-20 11:32 waketzheng 阅读(36) 评论(0) 推荐(0)