随笔分类 - python
摘要:from enum import Enum from collections import namedtuple class MainTypeEnum(Enum): FIRST = 1 SECOND = 2 MainTypeEnumNamedTuple = namedtuple("MainTypeE
阅读全文
摘要:import time import elasticsearch.helpers from faker import Faker from elasticsearch import Elasticsearch f = Faker(locale='zh_CN') es = Elasticsearch(
阅读全文
摘要:发布者 import redis pool = redis.ConnectionPool(host="xxxxx", port=6382, db=0, password="xxxxx") r = redis.Redis(connection_pool=pool) r.publish("my-firs
阅读全文
摘要:peewee的安装和入门 安装 pip install peewee peewee底层依赖pymysql,安装pymysql pip install pymysql -i https://pypi.douban.com/simple github源码 peewee官方文档 定义模型类,生成数据表结构
阅读全文