摘要: apscheduler.schedulers.blocking python定时器 阅读全文
posted @ 2024-08-12 14:30 干炸小黄鱼 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 简单的 python web项目docker-compose.yml示例, 包含flask初始化db等命令; 阅读全文
posted @ 2024-08-12 10:30 干炸小黄鱼 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 开源第三方库:https://sliverpy.readthedocs.io/en/latest/getting-started.html#connect-example 代码示例: import os import asyncio from sliver import SliverClientCo 阅读全文
posted @ 2024-08-07 11:51 干炸小黄鱼 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 准备工作 sliver客户端和服务端之间命令的通信采用的grpc, 服务端和和植入程序通信使用的protobuf,所以在开发之前需要了解 grpc和protobuf, 相关文档: https://jergoo.gitbooks.io/go-grpc-practice-guide/content/ch 阅读全文
posted @ 2024-08-07 11:45 干炸小黄鱼 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 定义一个统一的schema类对提交的业务参数进行格式和数据约束非常有必要, 下面使用 pydantic 来封装此工具; import logging from pydantic import BaseModel, ValidationError, root_validator class Pydan 阅读全文
posted @ 2024-07-31 16:17 干炸小黄鱼 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 一、基础环境说明 节点名 节点ip 角色 操作系统 node1 10.42.8.13 control-plane,etcd,master CentOS7.9 node2 10.42.8.14 control-plane,etcd,master CentOS7.9 node3 10.42.8.15 c 阅读全文
posted @ 2024-07-29 11:31 干炸小黄鱼 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 基础数据 LONGITUDE_LATITUDE = { "110000": {"name": "北京市", "latitude": 39.904989, "longitude": 116.405285}, "110101": {"name": "东城区", "latitude": 39.917544 阅读全文
posted @ 2024-07-26 16:46 干炸小黄鱼 阅读(1) 评论(0) 推荐(0) 编辑
摘要: flask 迁移数据库时可能会遇到找不到版本的问题 export FLASK_APP=run.py flask db migrate 执行上述命令时正常会提示加了哪些字段,删除了哪些字段 但是有时候会提示: ERROR [flask_migrate] Error: Can't locate revi 阅读全文
posted @ 2024-07-25 14:23 干炸小黄鱼 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://rook.github.io/docs/rook/v1.12/Getting-Started/quickstart/#prerequisites 1、下载部署文件 git clone --single-branch --branch v1.12.4 https://gith 阅读全文
posted @ 2024-07-19 11:43 干炸小黄鱼 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 背景: 有个一个组织机构. 并没有设计父级id, 只有id, title, nature 三个字段, nature=1/2/3/4 分别表示级几级单位; 现在要模糊查询本级, 上级, 上上级, 上上上级的title中包含 特定字符的记录;使用sqlalchemy递归查询,下面代码没调试,不保证运行, 阅读全文
posted @ 2024-07-15 10:05 干炸小黄鱼 阅读(11) 评论(0) 推荐(0) 编辑