摘要: https://www.runoob.com/python/python-built-in-functions.html Python 内置函数 内置函数 abs() divmod() input() open() staticmethod() all() enumerate() int() ord 阅读全文
posted @ 2021-03-09 20:01 薄荷味日记 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 一、LinkExtrator就非常适合整站抓取 import scrapy from scrapy.linkextractor import LinkExtractor class WeidsSpider(scrapy.Spider): name = "weids" allowed_domains 阅读全文
posted @ 2021-03-09 19:34 薄荷味日记 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 文档: https://www.osgeo.cn/scrapy/topics/practices.html 1、scrapy.crawler.CrawlerProcess Scrapy构建于Twisted异步网络框架基础之上,因此你需要在Twisted reactor里面运行。 可以使用scrapy 阅读全文
posted @ 2021-03-09 19:31 薄荷味日记 阅读(282) 评论(0) 推荐(0) 编辑
摘要: FastAPI 使用的框架 Pydantic Pydantic 是一个库,基于Python类型提示来定义数据验证,序列化和文档(使用JSON模式)。这使其非常直观。它可与 Marshmallow 媲美。尽管在基准测试中它比Marshmallow 更快。并且由于它基于相同的Python类型提示,因此对 阅读全文
posted @ 2021-03-09 16:07 薄荷味日记 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 官方: https://pydantic-docs.helpmanual.io/ 翻译: https://blog.csdn.net/swinfans/article/details/89629641#t9 阅读全文
posted @ 2021-03-09 15:28 薄荷味日记 阅读(808) 评论(0) 推荐(0) 编辑
摘要: Click 是一个利用很少的代码以可组合的方式创造优雅命令行工具接口的 Python 库。 它是高度可配置的,但却有合理默认值的“命令行接口创建工具”。 Click 的三个特性: 任意嵌套命令 自动生成帮助页面 支持在运行时延迟加载子命令 import click @click.command() 阅读全文
posted @ 2021-03-09 10:24 薄荷味日记 阅读(456) 评论(0) 推荐(0) 编辑