当前位置:首页>python>Python第三方库实战:掌握强大工具链

Python第三方库实战:掌握强大工具链

  • 2026-03-23 20:14:59
Python第三方库实战:掌握强大工具链

嘿,学习搭子!咱们一起闯过了内置模块的关卡,是不是感觉Python标准库已经足够强大了?但你知道吗,Python真正的魅力在于它 “海纳百川” 的第三方库生态!从数据科学到Web开发,从机器学习到自动化脚本,几乎每个领域都有成熟的解决方案等着咱们去探索。今天,我就带你走进Python的 “工具宝库”,一起掌握第三方库的安装、管理和实战应用!

引言:为什么需要掌握第三方库?

你有没有遇到过这样的挑战:

  • • 想要分析数据,却不知道如何高效处理Excel、CSV文件?
  • • 需要从网站获取数据,但HTTP请求处理起来很繁琐?
  • • 想创建可视化图表,但内置的绘图功能不够强大?
  • • 打算开发Web应用,却不知道从哪里开始?
  • • 想要尝试机器学习,但数学公式和算法实现让人头疼?

如果你的答案是“是的,我经常需要这些功能!”,那今天这篇文章就是为你量身定做的。咱们要系统学习 Python第三方库生态的核心组成:pip包管理、虚拟环境、以及requests、pandas、numpy、matplotlib、scikit-learn、flask等常用库。通过设计 数据采集与分析、Web应用开发 等实际案例,你将掌握如何利用Python生态解决真实问题。

学习目标:学完本章,你不仅能熟练使用pip安装和管理第三方库,还能根据需求选择合适的库,并构建完整的项目开发环境。预期成果:掌握第三方库生态的核心工具,能独立完成数据采集、处理、分析和Web应用开发,并为后续学习网络编程打下坚实基础。

核心内容:第三方库生态深度解析

1. pip包管理:Python生态的“应用商店”

pip是Python的官方包安装器,是咱们获取第三方库的主要途径。

核心功能:安装、升级、卸载

# 咱们先来熟悉几个最常用的pip命令:# 1. 安装包(基础用法)# 安装最新版本pip install requests# 安装指定版本pip install requests==2.31.0# 2. 升级包pip install --upgrade requests# 3. 卸载包pip uninstall requests -y  # -y 跳过确认提示# 4. 查看已安装的包pip list# 列出所有包pip show requests           # 查看requests包的详细信息# 5. 搜索包(查看可用版本)pip index versions requests

高效技巧:镜像源配置

默认的PyPI源在国外,下载速度可能较慢。别慌,咱们可以切换到国内镜像源:

临时使用(单次安装):

pip install requests -i https://pypi.tuna.tsinghua.edu.cn/simple

永久配置(推荐):

  • • Windows:在用户目录(如 C:\Users\你的用户名)下新建 pip 文件夹,创建 pip.ini 文件:
[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple
  • • Mac/Linux:在用户目录下创建 .pip/pip.conf 文件:
[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simpletrusted-host = pypi.tuna.tsinghua.edu.cn

项目依赖管理:requirements.txt

在实际项目中,咱们需要精确记录依赖版本,确保环境可复现:

# 生成依赖清单pip freeze > requirements.txt# 内容示例:# requests==2.31.0# pandas==2.1.1# flask==3.0.0# 从requirements.txt安装所有依赖pip install -r requirements.txt

最佳实践

  • • 将 requirements.txt 提交到Git版本控制
  • • 将虚拟环境目录(如 venv/)添加到 .gitignore
  • • 使用 pip freeze 时确保虚拟环境已激活

2. 虚拟环境:项目的“独立空间”

虚拟环境是Python项目的“隔离舱”,让不同项目使用不同的依赖版本,互不干扰。

使用内置venv模块

Python 3.3+ 自带venv模块,无需额外安装:

# 创建虚拟环境python -m venv myproject_env  # Windows/Mac/Linux通用# 激活虚拟环境# Windows (CMD):myproject_env\Scripts\activate.bat# Windows (PowerShell):.\myproject_env\Scripts\Activate.ps1# Mac/Linux:source myproject_env/bin/activate# 激活成功后,终端前缀会显示环境名# (myproject_env) $# 验证Python路径which python  # Mac/Linuxwhere python  # Windows# 在虚拟环境中安装包pip install requests pandas# 退出虚拟环境deactivate

虚拟环境使用场景

  • • 新项目开发:为每个项目创建独立的虚拟环境
  • • 依赖版本冲突:项目A需要requests 2.20,项目B需要requests 3.0
  • • 环境复现:确保开发、测试、生产环境的一致性
  • • 团队协作:通过requirements.txt共享依赖配置

重要提醒:每次打开新终端都需要重新激活虚拟环境!

3. 常用第三方库深度解析

3.1 requests:优雅的HTTP客户端

requests让HTTP请求变得简单直观,是网络爬虫、API调用的首选工具。

import requests# 基本GET请求response = requests.get('https://api.github.com')print(f"状态码: {response.status_code}")print(f"响应内容: {response.text[:100]}...")# 带参数的GET请求params = {'q''python''page'1}response = requests.get('https://api.github.com/search/repositories', params=params)# POST请求data = {'username''test''password''test123'}response = requests.post('https://httpbin.org/post', data=data)# 处理JSON响应if response.status_code == 200:    json_data = response.json()print(f"仓库总数: {json_data['total_count']}")# 设置请求头headers = {'User-Agent''Mozilla/5.0','Authorization''Bearer your_token'}response = requests.get('https://api.github.com/user', headers=headers)# 错误处理try:    response = requests.get('https://api.github.com', timeout=5)    response.raise_for_status()  # 检查HTTP错误except requests.exceptions.RequestException as e:print(f"请求失败: {e}")

3.2 pandas:数据分析利器

pandas提供了DataFrame数据结构,让数据处理、清洗、分析变得高效。

import pandas as pdimport numpy as np# 创建DataFramedata = {'姓名': ['张三''李四''王五'],'年龄': [253035],'城市': ['北京''上海''广州']}df = pd.DataFrame(data)print("原始数据:")print(df)# 基本操作print(f"\\n数据形状: {df.shape}")  # (3, 3)print(f"列名: {list(df.columns)}")print(f"数据类型:\\n{df.dtypes}")# 数据筛选young_people = df[df['年龄'] < 30]print("\\n年龄小于30的人:")print(young_people)# 数据分组grouped = df.groupby('城市')['年龄'].mean()print("\\n各城市平均年龄:")print(grouped)# 处理缺失值df_with_nan = pd.DataFrame({'A': [12, np.nan],'B': [4, np.nan, 6]})df_filled = df_with_nan.fillna(0)print("\\n填充缺失值后:")print(df_filled)# 读取CSV文件# sales_data = pd.read_csv('sales.csv')# 读取Excel文件# excel_data = pd.read_excel('data.xlsx', sheet_name='Sheet1')

3.3 numpy:高性能数值计算

numpy提供了多维数组对象和数学函数,是科学计算的基础。

import numpy as np# 创建数组arr1 = np.array([12345])arr2 = np.array([[123], [456]])zeros = np.zeros((33))ones = np.ones((24))random_arr = np.random.rand(33)print(f"一维数组: {arr1}")print(f"二维数组:\\n{arr2}")print(f"零矩阵:\\n{zeros}")# 数组运算arr_squared = arr1 ** 2arr_sum = arr1 + 10arr_mean = np.mean(arr1)print(f"\\n平方: {arr_squared}")print(f"加10: {arr_sum}")print(f"平均值: {arr_mean}")# 矩阵运算matrix1 = np.array([[12], [34]])matrix2 = np.array([[56], [78]])matrix_product = np.dot(matrix1, matrix2)print(f"\\n矩阵相乘:\\n{matrix_product}")# 广播机制matrix3 = np.array([[123], [456]])scaled = matrix3 * 2# 每个元素乘以2print(f"\\n广播运算:\\n{scaled}")

3.4 matplotlib:专业数据可视化

matplotlib是Python最流行的绘图库,支持多种图表类型。

import matplotlib.pyplot as pltimport numpy as np# 设置中文字体(避免中文显示为方框)plt.rcParams['font.sans-serif'] = ['Noto Sans CJK JP']plt.rcParams['axes.unicode_minus'] = False# 折线图示例x = np.linspace(010100)y = np.sin(x)plt.figure(figsize=(106))plt.plot(x, y, 'b-', linewidth=2, label='sin(x)')plt.title('正弦函数图像', fontsize=16)plt.xlabel('x轴', fontsize=12)plt.ylabel('y轴', fontsize=12)plt.grid(True, alpha=0.3)plt.legend()plt.show()# 多子图示例fig, axes = plt.subplots(22, figsize=(128))# 子图1:散点图x_scatter = np.random.rand(50)y_scatter = np.random.rand(50)colors = np.random.rand(50)sizes = 100 * np.random.rand(50)axes[00].scatter(x_scatter, y_scatter, c=colors, s=sizes, alpha=0.5)axes[00].set_title('随机散点图')# 子图2:柱状图categories = ['A''B''C''D']values = [23455678]axes[01].bar(categories, values, color='skyblue')axes[01].set_title('柱状图示例')# 子图3:饼图labels = ['Python''Java''C++''JavaScript']sizes = [40252015]explode = (0.1000)axes[10].pie(sizes, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)axes[10].set_title('编程语言占比')# 子图4:直方图data_normal = np.random.normal(011000)axes[11].hist(data_normal, bins=30, alpha=0.7, color='green')axes[11].set_title('正态分布直方图')plt.tight_layout()plt.show()

3.5 scikit-learn:机器学习入门

scikit-learn提供了简单高效的数据挖掘和数据分析工具。

from sklearn import datasetsfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import StandardScalerfrom sklearn.linear_model import LogisticRegressionfrom sklearn.metrics import accuracy_score, classification_report# 加载经典数据集iris = datasets.load_iris()X = iris.data  # 特征y = iris.target  # 标签print(f"数据集形状: {X.shape}")print(f"特征名: {iris.feature_names}")print(f"类别名: {iris.target_names}")# 划分训练集和测试集X_train, X_test, y_train, y_test = train_test_split(    X, y, test_size=0.3, random_state=42)print(f"\\n训练集大小: {X_train.shape[0]}")print(f"测试集大小: {X_test.shape[0]}")# 特征标准化scaler = StandardScaler()X_train_scaled = scaler.fit_transform(X_train)X_test_scaled = scaler.transform(X_test)# 训练模型model = LogisticRegression(max_iter=200)model.fit(X_train_scaled, y_train)# 预测y_pred = model.predict(X_test_scaled)# 评估accuracy = accuracy_score(y_test, y_pred)print(f"\\n模型准确率: {accuracy:.2%}")print("\\n详细分类报告:")print(classification_report(y_test, y_pred, target_names=iris.target_names))

3.6 flask:轻量级Web框架

flask让Web应用开发变得简单快速。

from flask import Flask, request, jsonify, render_templateapp = Flask(__name__)# 基本路由@app.route('/')defhome():return'欢迎来到Flask世界!'# 带参数的路由@app.route('/user/<username>')defshow_user(username):returnf'用户: {username}'# 处理GET和POST请求@app.route('/api/data', methods=['GET''POST'])defhandle_data():if request.method == 'GET':# 获取查询参数        name = request.args.get('name''默认名')return jsonify({'message'f'Hello {name}''method''GET'})elif request.method == 'POST':# 获取JSON数据        data = request.get_json()return jsonify({'received': data, 'method''POST'})# 模板渲染示例@app.route('/hello/<name>')defhello_name(name):return render_template('hello.html', name=name)# 错误处理@app.errorhandler(404)defpage_not_found(error):return render_template('404.html'), 404if __name__ == '__main__':    app.run(debug=True, host='0.0.0.0', port=5000)

配套HTML模板示例

创建 templates/hello.html

<!DOCTYPE html><html><head><title>欢迎页面</title></head><body><h1>你好,{{ name }}!</h1><p>欢迎来到Flask应用。</p></body></html>

创建 templates/404.html

<!DOCTYPE html><html><head><title>页面未找到</title></head><body><h1>404 - 页面未找到</h1><p>抱歉,您访问的页面不存在。</p></body></html>

实战案例:天气数据采集与分析系统

案例1:使用requests和pandas进行数据采集与分析

这个案例咱们将创建一个完整的天气数据采集与分析系统。

import requestsimport pandas as pdimport matplotlib.pyplot as pltfrom datetime import datetime, timedelta# 设置中文字体plt.rcParams['font.sans-serif'] = ['Noto Sans CJK JP']plt.rcParams['axes.unicode_minus'] = FalseclassWeatherDataCollector:"""天气数据采集器"""def__init__(self, api_key=None):self.api_key = api_keyself.base_url = "http://api.openweathermap.org/data/2.5"defget_current_weather(self, city):"""获取当前天气"""        url = f"{self.base_url}/weather"        params = {'q': city,'appid'self.api_key,'units''metric','lang''zh_cn'        }try:            response = requests.get(url, params=params, timeout=10)            response.raise_for_status()return response.json()except requests.exceptions.RequestException as e:print(f"获取天气数据失败: {e}")returnNonedefget_forecast(self, city, days=5):"""获取天气预报"""        url = f"{self.base_url}/forecast"        params = {'q': city,'appid'self.api_key,'units''metric','lang''zh_cn','cnt': days * 8# 每3小时一个数据点        }try:            response = requests.get(url, params=params, timeout=10)            response.raise_for_status()return response.json()except requests.exceptions.RequestException as e:print(f"获取天气预报失败: {e}")returnNonedefparse_forecast_data(self, forecast_data):"""解析天气预报数据"""ifnot forecast_data or'list'notin forecast_data:returnNone        records = []for item in forecast_data['list']:            record = {'时间': datetime.fromtimestamp(item['dt']),'温度_℃': item['main']['temp'],'体感温度_℃': item['main']['feels_like'],'最低温度_℃': item['main']['temp_min'],'最高温度_℃': item['main']['temp_max'],'湿度_%': item['main']['humidity'],'气压_hPa': item['main']['pressure'],'天气': item['weather'][0]['description'],'风速_m/s': item['wind']['speed'],'云量_%': item['clouds']['all']            }            records.append(record)return pd.DataFrame(records)# 使用示例defanalyze_weather_data():"""分析天气数据"""# 注意:这里需要实际的API密钥,咱们使用模拟数据演示print("注意:实际使用时需要OpenWeatherMap API密钥")print("这里咱们使用模拟数据进行演示")# 创建模拟数据    dates = pd.date_range(start='2024-01-01', periods=30, freq='D')    temperatures = np.random.normal(20530)  # 平均20度,标准差5    humidity = np.random.normal(601530)  # 平均60%,标准差15# 创建DataFrame    weather_df = pd.DataFrame({'日期': dates,'温度_℃': temperatures,'湿度_%': humidity    })print("天气数据前5行:")print(weather_df.head())print(f"\\n数据统计:")print(f"平均温度: {weather_df['温度_℃'].mean():.1f}℃")print(f"最高温度: {weather_df['温度_℃'].max():.1f}℃")print(f"最低温度: {weather_df['温度_℃'].min():.1f}℃")print(f"平均湿度: {weather_df['湿度_%'].mean():.1f}%")# 可视化    fig, (ax1, ax2) = plt.subplots(21, figsize=(128))# 温度折线图    ax1.plot(weather_df['日期'], weather_df['温度_℃'], 'r-o', linewidth=2, markersize=5)    ax1.set_title('30天温度变化趋势', fontsize=16)    ax1.set_xlabel('日期', fontsize=12)    ax1.set_ylabel('温度 (℃)', fontsize=12)    ax1.grid(True, alpha=0.3)# 湿度柱状图    ax2.bar(weather_df['日期'], weather_df['湿度_%'], color='skyblue', alpha=0.7)    ax2.set_title('30天湿度变化', fontsize=16)    ax2.set_xlabel('日期', fontsize=12)    ax2.set_ylabel('湿度 (%)', fontsize=12)    ax2.grid(True, alpha=0.3)    plt.tight_layout()    plt.show()return weather_df# 运行分析if __name__ == "__main__":print("=== 天气数据采集与分析系统 ===\\n")    analyze_weather_data()

案例2:Flask天气数据API服务

这个案例咱们将创建一个提供天气数据的Flask API服务。

"""weather_api.pyFlask天气数据API服务"""from flask import Flask, request, jsonifyimport pandas as pdimport numpy as npfrom datetime import datetime, timedeltaapp = Flask(__name__)# 模拟天气数据库defcreate_sample_weather_data():"""创建模拟天气数据"""    cities = ['北京''上海''广州''深圳''杭州']    data = []for city in cities:for i inrange(30):  # 30天的数据            date = datetime.now() - timedelta(days=29-i)            temp = np.random.normal(20 + np.random.randint(-55), 5)            humidity = np.random.normal(60 + np.random.randint(-1010), 10)            data.append({'city': city,'date': date.strftime('%Y-%m-%d'),'temperature'round(temp, 1),'humidity'round(humidity, 1),'weather': np.random.choice(['晴天''多云''小雨''阴天'])            })return pd.DataFrame(data)# 全局天气数据weather_df = create_sample_weather_data()@app.route('/')defindex():"""首页"""return'''    <h1>天气数据API服务</h1>    <p>可用接口:</p>    <ul>        <li>GET /api/weather/cities - 获取所有城市</li>        <li>GET /api/weather/<city> - 获取指定城市天气数据</li>        <li>GET /api/weather/<city>/latest - 获取最新天气</li>        <li>POST /api/weather/query - 查询天气数据</li>    </ul>    '''@app.route('/api/weather/cities', methods=['GET'])defget_cities():"""获取所有城市列表"""    cities = weather_df['city'].unique().tolist()return jsonify({'success'True,'count'len(cities),'cities': cities    })@app.route('/api/weather/<city>', methods=['GET'])defget_city_weather(city):"""获取指定城市所有天气数据"""    city_data = weather_df[weather_df['city'] == city]if city_data.empty:return jsonify({'success'False,'message'f'未找到城市: {city}'        }), 404# 转换为字典列表    records = city_data.to_dict('records')return jsonify({'success'True,'city': city,'count'len(records),'data': records    })@app.route('/api/weather/<city>/latest', methods=['GET'])defget_latest_weather(city):"""获取指定城市最新天气"""    city_data = weather_df[weather_df['city'] == city]if city_data.empty:return jsonify({'success'False,'message'f'未找到城市: {city}'        }), 404# 获取最新日期    latest_date = city_data['date'].max()    latest_data = city_data[city_data['date'] == latest_date].iloc[0]return jsonify({'success'True,'city': city,'date': latest_date,'temperature': latest_data['temperature'],'humidity': latest_data['humidity'],'weather': latest_data['weather']    })@app.route('/api/weather/query', methods=['POST'])defquery_weather():"""查询天气数据"""    data = request.get_json()ifnot data:return jsonify({'success'False,'message''请求数据为空'        }), 400    city = data.get('city')    start_date = data.get('start_date')    end_date = data.get('end_date')# 基础查询    query_result = weather_df.copy()if city:        query_result = query_result[query_result['city'] == city]if start_date:        query_result = query_result[query_result['date'] >= start_date]if end_date:        query_result = query_result[query_result['date'] <= end_date]# 转换为字典列表    records = query_result.to_dict('records')# 计算统计信息    stats = {}ifnot query_result.empty:        stats = {'avg_temperature'round(query_result['temperature'].mean(), 1),'max_temperature'round(query_result['temperature'].max(), 1),'min_temperature'round(query_result['temperature'].min(), 1),'avg_humidity'round(query_result['humidity'].mean(), 1)        }return jsonify({'success'True,'filters': data,'count'len(records),'statistics': stats,'data': records    })@app.route('/api/weather/stats', methods=['GET'])defget_weather_stats():"""获取天气统计信息"""    stats = []for city in weather_df['city'].unique():        city_data = weather_df[weather_df['city'] == city]        stats.append({'city': city,'record_count'len(city_data),'avg_temperature'round(city_data['temperature'].mean(), 1),'temperature_range'f"{round(city_data['temperature'].min(), 1)} - {round(city_data['temperature'].max(), 1)}",'avg_humidity'round(city_data['humidity'].mean(), 1),'common_weather': city_data['weather'].mode().iloc[0ifnot city_data['weather'].mode().empty else'未知'        })return jsonify({'success'True,'count'len(stats),'statistics': stats    })if __name__ == '__main__':print("启动天气数据API服务...")print("访问 http://127.0.0.1:5000 查看接口文档")    app.run(debug=True, host='0.0.0.0', port=5000)

阶梯式练习:从入门到实战

初级练习:环境搭建与基础使用

目标:创建虚拟环境并安装基础库

  1. 1. 创建项目目录和虚拟环境
    mkdir weather_projectcd weather_projectpython -m venv venv
  2. 2. 激活虚拟环境
    # Windowsvenv\\Scripts\\activate.bat# Mac/Linuxsource venv/bin/activate
  3. 3. 安装基础库
    pip install requests pandas numpy matplotlib
  4. 4. 验证安装
    python -c "import requests; import pandas; print('安装成功!')"
  5. 5. 创建requirements.txt
    pip freeze > requirements.txt

中级练习:数据采集与分析

目标:使用requests采集数据,pandas进行分析

  1. 1. 创建数据采集脚本data_collector.py
    • • 使用requests访问公开API(如 https://jsonplaceholder.typicode.com/posts
    • • 将获取的数据保存为JSON文件
  2. 2. 创建数据分析脚本data_analyzer.py
    • • 使用pandas读取JSON数据
    • • 计算基本统计信息(数量、平均值等)
    • • 筛选特定条件的数据
  3. 3. 创建可视化脚本data_visualizer.py
    • • 使用matplotlib绘制柱状图、折线图
    • • 保存图表为图片文件
  4. 4. 整合脚本main.py
    • • 按顺序调用采集、分析、可视化脚本
    • • 添加错误处理和日志记录

高级练习:完整项目开发

目标:开发完整的天气数据系统

  1. 1. 项目结构设计
    weather_system/├── app.py              # Flask主应用├── requirements.txt    # 依赖文件├── config.py          # 配置文件├── models/            # 数据模型│   ├── weather.py│   └── database.py├── services/          # 业务逻辑│   ├── collector.py│   └── analyzer.py├── api/               # API接口│   ├── weather.py│   └── statistics.py├── static/            # 静态文件│   └── css/└── templates/         # HTML模板    ├── index.html    └── dashboard.html
  2. 2. 功能实现
    • • 数据采集:定时从天气API获取数据
    • • 数据存储:使用SQLite数据库
    • • Web界面:显示实时天气和图表
    • • API接口:提供JSON格式数据
  3. 3. 进阶功能
    • • 用户认证:注册登录功能
    • • 城市管理:添加/删除关注城市
    • • 数据导出:支持CSV/Excel导出
    • • 邮件通知:天气预警通知
  4. 4. 部署上线
    • • 使用Docker容器化
    • • 部署到云服务器
    • • 配置域名和HTTPS

总结与预告

本章核心要点回顾

通过今天的实战,咱们一起掌握了Python第三方库生态的核心工具:

  1. 1. pip包管理:Python生态的"应用商店",掌握安装、升级、卸载和依赖管理
  2. 2. 虚拟环境:项目的"独立空间",解决依赖冲突,确保环境可复现
  3. 3. 常用第三方库
    • • requests:优雅的HTTP客户端,网络请求变得简单
    • • pandas:数据分析利器,DataFrame处理结构化数据
    • • numpy:高性能数值计算,科学计算的基础
    • • matplotlib:专业数据可视化,多种图表类型支持
    • • scikit-learn:机器学习入门,简单高效的数据挖掘工具
    • • flask:轻量级Web框架,快速开发Web应用

这些第三方库让你的Python编程能力如虎添翼:

  • • ✅ 网络通信:轻松处理HTTP请求,获取网络数据
  • • ✅ 数据处理:高效清洗、转换、分析结构化数据
  • • ✅ 科学计算:强大的数值计算和矩阵运算
  • • ✅ 数据可视化:创建专业的统计图表和图形
  • • ✅ 机器学习:应用经典算法解决实际问题
  • • ✅ Web开发:构建完整的Web应用和服务

记住:熟练使用Python第三方库,是成为Python专家的关键。在实际项目中,先调研是否有成熟的第三方解决方案,避免重复造轮子,同时也要注意依赖管理和版本兼容性。

下章预告:网络编程入门

学完了第三方库生态,接下来咱们要进入 "网络通信新世界" 的新篇章——网络编程入门。

你将学到

  • • 网络基础:TCP/IP协议、Socket编程、客户端/服务器模型
  • • HTTP协议:请求/响应模型、状态码、头部信息
  • • 高级工具:异步网络编程、WebSocket实时通信
  • • 实战项目:开发聊天应用、文件传输工具、简单的Web服务器

核心技能

  1. 1. 使用socket模块创建TCP/UDP服务器和客户端
  2. 2. 理解HTTP协议并实现简单的HTTP服务器
  3. 3. 掌握requests库的高级用法和会话管理
  4. 4. 学习异步网络编程的基本概念

学习搭子,第三方库是Python生态的"法宝",掌握它们能让你的开发效率大幅提升。多加练习,把这些工具内化成你的编程直觉。有任何问题,随时来找我讨论!

记住:优秀的程序员不是记住所有API,而是知道什么时候用什么工具,以及如何组合它们解决问题。

"标准库是Python的基石,第三方库是Python的翅膀。先稳扎稳打,再展翅高飞。" —— 编程智慧

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 21:53:27 HTTP/2.0 GET : https://f.mffb.com.cn/a/482114.html
  2. 运行时间 : 0.090216s [ 吞吐率:11.08req/s ] 内存消耗:4,586.81kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=93ca48aca30ae7ae8de0d55bbcbd4a24
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000814s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000903s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000327s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000255s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000509s ]
  6. SELECT * FROM `set` [ RunTime:0.000193s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000637s ]
  8. SELECT * FROM `article` WHERE `id` = 482114 LIMIT 1 [ RunTime:0.001506s ]
  9. UPDATE `article` SET `lasttime` = 1774619607 WHERE `id` = 482114 [ RunTime:0.005504s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000257s ]
  11. SELECT * FROM `article` WHERE `id` < 482114 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000405s ]
  12. SELECT * FROM `article` WHERE `id` > 482114 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000368s ]
  13. SELECT * FROM `article` WHERE `id` < 482114 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.004351s ]
  14. SELECT * FROM `article` WHERE `id` < 482114 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002056s ]
  15. SELECT * FROM `article` WHERE `id` < 482114 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002728s ]
0.091998s