随笔分类 -  python

摘要:from enum import Enum from collections import namedtuple class MainTypeEnum(Enum): FIRST = 1 SECOND = 2 MainTypeEnumNamedTuple = namedtuple("MainTypeE 阅读全文
posted @ 2022-05-12 14:08 专职 阅读(71) 评论(0) 推荐(0) 编辑
摘要:import time import elasticsearch.helpers from faker import Faker from elasticsearch import Elasticsearch f = Faker(locale='zh_CN') es = Elasticsearch( 阅读全文
posted @ 2022-04-22 18:22 专职 阅读(104) 评论(0) 推荐(0) 编辑
摘要:发布者 import redis pool = redis.ConnectionPool(host="xxxxx", port=6382, db=0, password="xxxxx") r = redis.Redis(connection_pool=pool) r.publish("my-firs 阅读全文
posted @ 2022-04-10 20:31 专职 阅读(294) 评论(0) 推荐(0) 编辑
摘要:peewee的安装和入门 安装 pip install peewee peewee底层依赖pymysql,安装pymysql pip install pymysql -i https://pypi.douban.com/simple github源码 peewee官方文档 定义模型类,生成数据表结构 阅读全文
posted @ 2022-02-10 19:37 专职 阅读(629) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示