随笔分类 - Python
学习python语言过程中的一些记录
摘要:**官方文档:** [https://apscheduler.readthedocs.io](https://apscheduler.readthedocs.io) # APScheduler的4个组件 - triggers【触发器】 - job stores【任务存储】 - executors【执
阅读全文
摘要:1、首先安装elasticsearch包 pip install elasticsearch (一般会包含新旧版本,如果想要特定的版本,比如5.x 可以在后面加5数字) ```Python """ 1、首先安装elasticsearch包 pip install elasticsearch (一般会
阅读全文
摘要:## 读写分离 默认情况下,MongoClient 实例将查询发送到副本集的主要成员。 要使用副节点作为查询,以实现读写分离,我们必须更改读取首选项: 读取首选项在模块`pymongo.ReadPreference`下: - PRIMARY: 从主节点中读取(默认) - PRIMARY_PREFER
阅读全文
摘要:[https://pymongo.readthedocs.io/en/stable/examples/high_availability.html#](https://pymongo.readthedocs.io/en/stable/examples/high_availability.html#)
阅读全文
摘要:使用pymongo,具体可以参考官方文档: 语法上基本和原生mongodb是一样的,所以非常容易入手... [https://pymongo.readthedocs.io/en/stable/tutorial.html](https://pymongo.readthedocs.io/en/stabl
阅读全文