《Python编程从入门到实践》day34

# 昨日知识点回顾

        json文件提取数据、绘制图表渐变色显示

# 今日知识点学习

第17章

17.1 使用Web API

        Web API作为网站的一部分,用于与使用具体URL请求特定信息的程序交互,这种请求称为API调用。

        17.1.1 Git 和 GitHub

                Git:分布式版本控制系统,帮助人们管理为项目所做的工作,避免一个人所做的影响其他人所做的修改(类似于共享文档)。在项目实现新功能时,Git跟踪你对每个文件所做的修改,确认代码可行后,提交上线项目新功能。如果犯错可撤回,可以返回之前任何可行状态。

                GitHub:让程序员可以协助开发项目的网站。

        17.1.2 使用API调用请求数据             

浏览器地址栏输入:https://api.github.com/search/repositories?q=language:python&sort=stars

                显示结果:

{"total_count": 14026425,"incomplete_results": true,"items": [{"id": 54346799,"node_id": "MDEwOlJlcG9zaXRvcnk1NDM0Njc5OQ==","name": "public-apis","full_name": "public-apis/public-apis","private": false,"owner": {"login": "public-apis","id": 51121562,"node_id": "MDEyOk9yZ2FuaXphdGlvbjUxMTIxNTYy","avatar_url": "https://avatars.githubusercontent.com/u/51121562?v=4","gravatar_id": "","url": "https://api.github.com/users/public-apis","html_url": "https://github.com/public-apis","followers_url": "https://api.github.com/users/public-apis/followers","following_url": "https://api.github.com/users/public-apis/following{/other_user}","gists_url": "https://api.github.com/users/public-apis/gists{/gist_id}","starred_url": "https://api.github.com/users/public-apis/starred{/owner}{/repo}","subscriptions_url": "https://api.github.com/users/public-apis/subscriptions","organizations_url": "https://api.github.com/users/public-apis/orgs","repos_url": "https://api.github.com/users/public-apis/repos","events_url": "https://api.github.com/users/public-apis/events{/privacy}","received_events_url": "https://api.github.com/users/public-apis/received_events","type": "Organization","site_admin": false},"html_url": "https://github.com/public-apis/public-apis","description": "A collective list of free APIs",
---snip---

        17.1.3 安装Requests

        17.1.4 处理API响应

import requests# 执行API调用并存储响应
url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'
# 指定headers显示地要求使用这个版本的API
headers = {'Accept': 'application/vnd.github.v3+json'}
# requests调用API
r = requests.get(url, headers=headers)
# 状态码200表示请求成功
print(f"Status code:{r.status_code}")
# 将API响应赋给一个变量
response_dict = r.json()# 处理结果
print(response_dict.keys())# 运行结果:
# Status code:200
# dict_keys(['total_count', 'incomplete_results', 'items'])

        17.1.5 处理响应字典

import requests# 执行API调用并存储响应
url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(url, headers=headers)
print(f"Status code:{r.status_code}")
# 将API响应赋给一个变量
response_dict = r.json()
print(f"Total repositories:{response_dict['total_count']}")# 探索有关仓库的信息
repo_dicts = response_dict['items']
print(f"Repositories returned:{len(repo_dicts)}")# 研究第一个仓库
repo_dict = repo_dicts[0]
print(f"\nKeys:{len(repo_dict)}")
for key in sorted(repo_dict.keys()):print(key)# 运行结果:
# Status code:200
# Total repositories:14400151
# Repositories returned:30
# 
# Keys:80
# allow_forking
# archive_url
# archived
# assignees_url
# blobs_url
# branches_url
# clone_url
# collaborators_url
# comments_url
# commits_url
# compare_url
# contents_url
# contributors_url
# created_at
# default_branch
# deployments_url
# description
# disabled
# downloads_url
# events_url
# fork
# forks
# forks_count
# forks_url
# full_name
# git_commits_url
# git_refs_url
# git_tags_url
# git_url
# has_discussions
# has_downloads
# has_issues
# has_pages
# has_projects
# has_wiki
# homepage
# hooks_url
# html_url
# id
# is_template
# issue_comment_url
# issue_events_url
# issues_url
# keys_url
# labels_url
# language
# languages_url
# license
# merges_url
# milestones_url
# mirror_url
# name
# node_id
# notifications_url
# open_issues
# open_issues_count
# owner
# private
# pulls_url
# pushed_at
# releases_url
# score
# size
# ssh_url
# stargazers_count
# stargazers_url
# statuses_url
# subscribers_url
# subscription_url
# svn_url
# tags_url
# teams_url
# topics
# trees_url
# updated_at
# url
# visibility
# watchers
# watchers_count
# web_commit_signoff_required
import requests# 执行API调用并存储响应
url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(url, headers=headers)
print(f"Status code:{r.status_code}")
# 将API响应赋给一个变量
response_dict = r.json()
print(f"Total repositories:{response_dict['total_count']}")# 探索有关仓库的信息
repo_dicts = response_dict['items']
print(f"Repositories returned:{len(repo_dicts)}")# 研究第一个仓库
repo_dict = repo_dicts[0]print("\nSelected information about first respository:")
print(f"Name:{repo_dict['name']}")
print(f"Owner:{repo_dict['owner']['login']}")
print(f"Stars:{repo_dict['stargazers_count']}")
print(f"Resitory:{repo_dict['html_url']}")
print(f"Created:{repo_dict['created_at']}")
print(f"Updated:{repo_dict['updated_at']}")
print(f"Description:{repo_dict['description']}")# 运行结果:
# Status code:200
# Total repositories:11466073
# Repositories returned:30
# 
# Selected information about first respository:
# Name:docopt
# Owner:docopt
# Stars:7891
# Resitory:https://github.com/docopt/docopt
# Created:2012-04-07T17:45:14Z
# Updated:2024-05-15T15:47:30Z
# Description:This project is no longer maintained. Please see https://github.com/jazzband/docopt-ng

        17.1.6 概述最受欢迎的仓库

import requests# 执行API调用并存储响应
url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(url, headers=headers)
print(f"Status code:{r.status_code}")
# 将API响应赋给一个变量
response_dict = r.json()
print(f"Total repositories:{response_dict['total_count']}")# 探索有关仓库的信息
repo_dicts = response_dict['items']
print(f"Repositories returned:{len(repo_dicts)}")# 研究第一个仓库
repo_dict = repo_dicts[0]print("\nSelected information about each respository:")
for repo_dict in repo_dicts:print(f"\nName:{repo_dict['name']}")print(f"Owner:{repo_dict['owner']['login']}")print(f"Stars:{repo_dict['stargazers_count']}")print(f"Resitory:{repo_dict['html_url']}")print(f"Created:{repo_dict['created_at']}")print(f"Updated:{repo_dict['updated_at']}")print(f"Description:{repo_dict['description']}")# 运行结果:
# Status code:200
# Total repositories:13942109
# Repositories returned:30
# 
# Selected information about each respository:
# 
# Name:public-apis
# Owner:public-apis
# Stars:294054
# Resitory:https://github.com/public-apis/public-apis
# Created:2016-03-20T23:49:42Z
# Updated:2024-05-20T13:09:53Z
# Description:A collective list of free APIs
# 
# Name:system-design-primer
# Owner:donnemartin
# Stars:257751
# Resitory:https://github.com/donnemartin/system-design-primer
# Created:2017-02-26T16:15:28Z
# Updated:2024-05-20T13:13:05Z
# Description:Learn how to design large-scale systems. Prep for the system design interview.  Includes Anki flashcards.
# 
# Name:stable-diffusion-webui
# Owner:AUTOMATIC1111
# Stars:131594
# Resitory:https://github.com/AUTOMATIC1111/stable-diffusion-webui
# Created:2022-08-22T14:05:26Z
# Updated:2024-05-20T12:57:38Z
# Description:Stable Diffusion web UI
# 
# Name:thefuck
# Owner:nvbn
# Stars:83115
# Resitory:https://github.com/nvbn/thefuck
# Created:2015-04-08T15:08:04Z
# Updated:2024-05-20T13:10:19Z
# Description:Magnificent app which corrects your previous console command.
# 
# Name:yt-dlp
# Owner:yt-dlp
# Stars:72475
# Resitory:https://github.com/yt-dlp/yt-dlp
# Created:2020-10-26T04:22:55Z
# Updated:2024-05-20T13:10:53Z
# Description:A feature-rich command-line audio/video downloader
# 
# Name:fastapi
# Owner:tiangolo
# Stars:71670
# Resitory:https://github.com/tiangolo/fastapi
# Created:2018-12-08T08:21:47Z
# Updated:2024-05-20T11:32:01Z
# Description:FastAPI framework, high performance, easy to learn, fast to code, ready for production
# 
# Name:devops-exercises
# Owner:bregman-arie
# Stars:63948
# Resitory:https://github.com/bregman-arie/devops-exercises
# Created:2019-10-03T17:31:21Z
# Updated:2024-05-20T12:42:03Z
# Description:Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions
# 
# Name:awesome-machine-learning
# Owner:josephmisiti
# Stars:63846
# Resitory:https://github.com/josephmisiti/awesome-machine-learning
# Created:2014-07-15T19:11:19Z
# Updated:2024-05-20T11:18:56Z
# Description:A curated list of awesome Machine Learning frameworks, libraries and software.
# 
# Name:whisper
# Owner:openai
# Stars:61613
# Resitory:https://github.com/openai/whisper
# Created:2022-09-16T20:02:54Z
# Updated:2024-05-20T13:03:43Z
# Description:Robust Speech Recognition via Large-Scale Weak Supervision
# 
# Name:scikit-learn
# Owner:scikit-learn
# Stars:58360
# Resitory:https://github.com/scikit-learn/scikit-learn
# Created:2010-08-17T09:43:38Z
# Updated:2024-05-20T12:36:35Z
# Description:scikit-learn: machine learning in Python
# 
# Name:d2l-zh
# Owner:d2l-ai
# Stars:57414
# Resitory:https://github.com/d2l-ai/d2l-zh
# Created:2017-08-23T04:40:24Z
# Updated:2024-05-20T13:06:17Z
# Description:《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。
# 
# Name:screenshot-to-code
# Owner:abi
# Stars:51407
# Resitory:https://github.com/abi/screenshot-to-code
# Created:2023-11-14T17:53:32Z
# Updated:2024-05-20T13:04:16Z
# Description:Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
# 
# Name:scrapy
# Owner:scrapy
# Stars:51177
# Resitory:https://github.com/scrapy/scrapy
# Created:2010-02-22T02:01:14Z
# Updated:2024-05-20T12:33:49Z
# Description:Scrapy, a fast high-level web crawling & scraping framework for Python.
# 
# Name:Real-Time-Voice-Cloning
# Owner:CorentinJ
# Stars:51004
# Resitory:https://github.com/CorentinJ/Real-Time-Voice-Cloning
# Created:2019-05-26T08:56:15Z
# Updated:2024-05-20T11:48:51Z
# Description:Clone a voice in 5 seconds to generate arbitrary speech in real-time
# 
# Name:gpt-engineer
# Owner:gpt-engineer-org
# Stars:50790
# Resitory:https://github.com/gpt-engineer-org/gpt-engineer
# Created:2023-04-29T12:52:15Z
# Updated:2024-05-20T12:30:08Z
# Description:Specify what you want it to build, the AI asks for clarification, and then builds it.
# 
# Name:faceswap
# Owner:deepfakes
# Stars:49464
# Resitory:https://github.com/deepfakes/faceswap
# Created:2017-12-19T09:44:13Z
# Updated:2024-05-20T12:38:10Z
# Description:Deepfakes Software For All
# 
# Name:grok-1
# Owner:xai-org
# Stars:48512
# Resitory:https://github.com/xai-org/grok-1
# Created:2024-03-17T08:53:38Z
# Updated:2024-05-20T13:01:48Z
# Description:Grok open release
# 
# Name:yolov5
# Owner:ultralytics
# Stars:47467
# Resitory:https://github.com/ultralytics/yolov5
# Created:2020-05-18T03:45:11Z
# Updated:2024-05-20T12:39:12Z
# Description:YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
# 
# Name:DeepFaceLab
# Owner:iperov
# Stars:45740
# Resitory:https://github.com/iperov/DeepFaceLab
# Created:2018-06-04T13:10:00Z
# Updated:2024-05-20T12:37:54Z
# Description:DeepFaceLab is the leading software for creating deepfakes.
# 
# Name:professional-programming
# Owner:charlax
# Stars:45462
# Resitory:https://github.com/charlax/professional-programming
# Created:2015-11-07T05:07:52Z
# Updated:2024-05-20T12:48:24Z
# Description:A collection of learning resources for curious software engineers
# 
# Name:hackingtool
# Owner:Z4nzu
# Stars:43007
# Resitory:https://github.com/Z4nzu/hackingtool
# Created:2020-04-11T09:21:31Z
# Updated:2024-05-20T12:51:24Z
# Description:ALL IN ONE Hacking Tool For Hackers
# 
# Name:MetaGPT
# Owner:geekan
# Stars:40070
# Resitory:https://github.com/geekan/MetaGPT
# Created:2023-06-30T09:04:55Z
# Updated:2024-05-20T12:29:43Z
# Description:🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
# 
# Name:python-patterns
# Owner:faif
# Stars:39544
# Resitory:https://github.com/faif/python-patterns
# Created:2012-06-06T21:02:35Z
# Updated:2024-05-20T11:12:15Z
# Description:A collection of design patterns/idioms in Python
# 
# Name:PaddleOCR
# Owner:PaddlePaddle
# Stars:39051
# Resitory:https://github.com/PaddlePaddle/PaddleOCR
# Created:2020-05-08T10:38:16Z
# Updated:2024-05-20T13:11:14Z
# Description:Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
# 
# Name:Deep-Learning-Papers-Reading-Roadmap
# Owner:floodsung
# Stars:37466
# Resitory:https://github.com/floodsung/Deep-Learning-Papers-Reading-Roadmap
# Created:2016-10-14T11:49:48Z
# Updated:2024-05-20T12:15:58Z
# Description:Deep Learning papers reading roadmap for anyone who are eager to learn this amazing tech!
# 
# Name:text-generation-webui
# Owner:oobabooga
# Stars:37072
# Resitory:https://github.com/oobabooga/text-generation-webui
# Created:2022-12-21T04:17:37Z
# Updated:2024-05-20T12:37:44Z
# Description:A Gradio web UI for Large Language Models. Supports transformers, GPTQ, AWQ, EXL2, llama.cpp (GGUF), Llama models.
# 
# Name:stablediffusion
# Owner:Stability-AI
# Stars:36612
# Resitory:https://github.com/Stability-AI/stablediffusion
# Created:2022-11-23T23:59:50Z
# Updated:2024-05-20T12:34:55Z
# Description:High-Resolution Image Synthesis with Latent Diffusion Models
# 
# Name:interview_internal_reference
# Owner:0voice
# Stars:36173
# Resitory:https://github.com/0voice/interview_internal_reference
# Created:2019-06-10T06:54:19Z
# Updated:2024-05-20T12:04:15Z
# Description:2023年最新总结,阿里,腾讯,百度,美团,头条等技术面试题目,以及答案,专家出题人分析汇总。
# 
# Name:odoo
# Owner:odoo
# Stars:35106
# Resitory:https://github.com/odoo/odoo
# Created:2014-05-13T15:38:58Z
# Updated:2024-05-20T10:30:35Z
# Description:Odoo. Open Source Apps To Grow Your Business.
# 
# Name:mitmproxy
# Owner:mitmproxy
# Stars:34607
# Resitory:https://github.com/mitmproxy/mitmproxy
# Created:2010-02-16T04:10:13Z
# Updated:2024-05-20T11:21:02Z
# Description:An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.

        17.1.7 监视API的速率限制

浏览器地址栏输入:https://api.github.com/rate_limit
{"resources": {"core": {"limit": 60,"remaining": 59,"reset": 1716212802,"used": 1,"resource": "core"},"graphql": {"limit": 0,"remaining": 0,"reset": 1716214547,"used": 0,"resource": "graphql"},"integration_manifest": {"limit": 5000,"remaining": 5000,"reset": 1716214547,"used": 0,"resource": "integration_manifest"},"search": {"limit": 10,"remaining": 10,"reset": 1716211007,"used": 0,"resource": "search"}},"rate": {"limit": 60,"remaining": 59,"reset": 1716212802,"used": 1,"resource": "core"}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/18236.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Media Encoder 2024 for Mac媒体编码器安装教程ME2024安装包下载

安装 步骤 1,双击打开下载好的安装包。 2,选择install ame_24...双击打开启动安装程序。 3,点击install。 4,输入电脑密码。 5,软件安装中... 6,安装结束点击好。 7,返回打开的镜像 选择激活补…

零基础,想做一名网络安全工程师,该怎么学习?

​ 相比IT类的其它岗位,网络工程师的学习方向是比较明亮的。想要成为网络工程师,华为认证就是最好的学习方法。而网络工程师的从零开始学习就是从华为认证的初级开始学起,也就是HCIA,也就是从最基本的什么是IP地址、什么是交换机这…

响应式流和reactor框架进阶

响应式流和reactor框架进阶 响应式流创建、转换、处理 本文档主要介绍在响应式编程中如何从流中获取数据并处理。 前提条件 假设您已经能掌握Java基础、Maven使用、Lamda表达式、响应式编程等基础。 如何获取流中数据 🌏 说明 1、不要试图从流中获取数据出来&a…

Angular(1):使用Angular CLI创建空项目

要创建一个空的 Angular 项目,可以使用 Angular CLI(命令行界面)。以下是使用 Angular CLI 创建一个新项目的步骤: 1、安装 Angular CLI: 打开你的命令行界面(在 Windows 上是 CMD、PowerShell 或 Git Bas…

使用python绘制一个五颜六色的爱心

使用python绘制一个五颜六色的爱心 介绍效果代码 介绍 使用numpy与matplotlib绘制一个七彩爱心! 效果 代码 import numpy as np import matplotlib.pyplot as plt# Heart shape function def heart_shape(t):x 16 * np.sin(t)**3y 13 * np.cos(t) - 5 * np.cos…

微软:最新ChatGPT-4o模型,可在 Azure OpenAI上使用

北京时间5月14日凌晨,OpenAI 一场不到 30 分钟的发布会,正式发布了 GPT-4o,视频语音交互丝滑到吓人,还即将免费可用! GPT-4o,其中的「o」代表「omni」(即全面、全能的意思)&#xff…

AIGC行业:巨头引领的创新浪潮与市场前景

AIGC(AI Generated Content)技术,作为新兴的技术力量,正逐渐改变内容创作的生态。在这一变革中,国内科技巨头如百度、阿里巴巴、腾讯等的积极参与,不仅为行业带来资本和技术支持,更预示着AIGC技…

react 下拉框内容回显

需要实现效果如下 目前效果如下 思路 : 将下拉框选项的value和label一起存储到state中 , 初始化表单数据时 , 将faqType对应的label查找出来并设置到Form.Item中 , 最后修改useEffect 旧代码 //可以拿到faqType为0 但是却没有回显出下拉框的内容 我需要faqType为0 回显出下拉…

Shell脚本基本命令

文件名后缀.sh 编写shell脚本一定要说明一下在#!/bin/bash在进行编写。命令选项空格隔开。Shell脚本是解释的语言,bash 文件名即可打印出编写的脚本。chmod给权限命令。如 chmod 0777 文件名意思是给最高权限。 注意:count赋值不能加空格。取消变量可在变…

如何提升网络性能监控和流量回溯分析的效率?

目录 什么是网络性能监控? 网络性能监控的关键指标 什么是流量回溯分析? 流量回溯分析的应用场景 网络性能监控与流量回溯分析的结合 实例应用:AnaTraf网络流量分析仪 如何选择适合的网络性能监控和流量回溯分析工具? 结论…

MQTT 5.0 报文解析 06:AUTH

欢迎阅读 MQTT 5.0 报文系列 的最后一篇文章。在上一篇中,我们已经介绍了 MQTT 5.0 的 DISCONNECT 报文。现在,我们将介绍 MQTT 中的最后一个控制报文:AUTH。 MQTT 5.0 引入了增强认证特性,它使 MQTT 除了简单密码认证和 Token 认…

Vue3实战笔记(36)—粒子特效完成炫酷的404

文章目录 前言404特效总结 前言 昨天介绍了一个粒子特效小例子&#xff0c;不够直观&#xff0c;下面直接实战在自己的项目中实现一个好玩滴。 404特效 更改之前创建好的404.vue: <template><div class"container"><vue-particles id"tspartic…

阿里云和AWS的CDN产品对比分析

在现代互联网时代,内容分发网络(CDN)已成为确保网站和应用程序高性能和可用性的关键基础设施。作为两家领先的云服务提供商,阿里云和Amazon Web Services(AWS)都提供了成熟的CDN解决方案,帮助企业优化网络传输和提升用户体验。我们九河云一直致力于阿里云和AWS云相关业务&#…

【光伏干货】光伏无人机巡检步骤

随着光伏产业的迅速发展和无人机技术的日益成熟&#xff0c;光伏无人机巡检已成为提高光伏电站运维效率、降低运维成本的重要手段。本文将详细介绍光伏无人机巡检的步骤&#xff0c;帮助读者更好地理解和应用这一技术。 一、前期准备 1、设备检查&#xff1a;对无人机及其相关…

mysql内存和磁盘的关系

mysql内存和磁盘的关系 1.MySQL的内存和磁盘之间的关系是密切的。MySQL的数据存储在磁盘上&#xff0c;但为了高效地执行查询操作&#xff0c;它也会将数据页&#xff08;每个页通常为16KB&#xff09;读入内存。MySQL的缓冲池&#xff08;buffer pool&#xff09;是在内存中的…

谷歌插件编写

目录 manifest.json {"manifest_version": 3,"name": "Floating Ball","version": "1.0","description": "A floating ball on the right side of the webpage.","permissions": ["act…

【算法】位运算算法——两整数之和

题解&#xff1a;两整数之和(位运算算法) 目录 1.题目2.位运算算法3.参考代码4.总结 1.题目 题目链接&#xff1a;LINK 2.位运算算法 这个题目难点就在于不能用、- 那什么能够代替加号呢&#xff1f; 既然数的层面不能用号&#xff0c;那二进制的角度去用号即可。 恰好&a…

MySQL 数据类型和搜索引擎

文章目录 【 1. 数据类型 】1.1 数值类型1.1.1 整型1.1.2 小数1.1.3 数值类型的选择 1.2 日期和时间YEAR 年TIME 时间DATE 日期DATETIME 日期时间TIMESTAMP 时间戳日期和时间的选择 1.3 文本字符串CHAR 固定字符串、VARCHAR 可变字符串TEXT 文本ENUM 枚举SET 集合字符串类型的选…

假如有几十个请求,如何去控制高并发?

公司项目中做图片或文件批量下载&#xff0c;每次下载都是大批量的&#xff0c;那么假如我一次性下载几十个&#xff0c;如何去控制并发请求的&#xff1f; 让我想想&#xff0c;额~&#xff0c; 选中ID&#xff0c;循环请求&#xff1f;&#xff0c;八嘎&#xff01;肯定不是那…

MySQL中Undo-log是什么?有什么作用?

2.6.1. Undo-log撤销日志 Undo即撤销的意思&#xff0c;通常也称为回滚日志&#xff0c;用来给MySQL撤销SQL操作的。 当一条写入类型的SQL执行时&#xff0c;都会记录Undo-log日志&#xff0c;Undo-log并不存在单独的日志文件&#xff0c;InnoDB默认是将Undo-log存储在xx.ibd…