当前位置:首页>python>偷偷用这些Python库,我的开发效率提升了10倍

偷偷用这些Python库,我的开发效率提升了10倍

  • 2026-02-05 15:15:39
偷偷用这些Python库,我的开发效率提升了10倍

你是不是也经常陷入这样的困境:

想法很美好,原型很骨感。

脑子里蹦出一个绝妙的点子,兴奋地打开编辑器,半小时后……你还在和JSON验证、配置文件、数据转换、异常处理作斗争。本来只想测试一个简单的假设,结果却花了大半天时间搭建了一个“原型框架”。

“Python写起来快”,直到你需要处理真实世界的混乱数据、需要监控文件变化、需要保证类型安全、需要分析性能瓶颈……

今天,我想和你分享9个不那么“网红”,却真正能杠杆化你的开发效率的Python库。它们不会出现在每个“Top 10”榜单里,却能悄无声息地帮你抹掉那些烦人的、重复的、耗时的“脚手架”工作。

让你的想法,在几分钟内变成可运行的代码。

一、数据与序列化:告别“胶水代码”地狱

原型的第一道坎,往往是数据进出的边界。如何快速、安全、高效地处理JSON、YAML,或者转换嵌套字典的结构?

1. msgspec:快到“犯罪”的序列化库

当你需要处理大量API请求、配置文件或缓存数据时,json模块和流行的pydantic可能会成为性能瓶颈。msgspec是一个基于模式(Schema)的序列化/反序列化库,它的速度比标准json快10-50倍,并且提供严格的类型安全。

为什么是原型利器?

  • 零样板验证:定义一次结构,处处安全使用。
  • 极致性能:处理大量数据时体验飞一般的感觉。
  • 类型即文档:代码就是最好的说明。
import msgspecimport jsonimport time# 1. 定义一个用户结构classUser(msgspec.Struct):    id: int    name: str    email: str | None = None# 可选字段    active: bool = True# 默认值# 2. 从JSON字节流快速解码为强类型对象raw_json = b'{"id": 123, "name": "小明", "email": "xiaoming@example.com"}'user = msgspec.json.decode(raw_json, type=User)print(user)  # 输出: User(id=123, name='小明', email='xiaoming@example.com', active=True)# 3. 快速编码回JSONencoded = msgspec.json.encode(user)print(encoded.decode('utf-8'))# 输出: {"id":123,"name":"小明","email":"xiaoming@example.com","active":true}# 4. 性能对比小实验(感受一下差距)data = [{"id": i, "name"f"user_{i}"for i in range(10000)]json_bytes = json.dumps(data).encode()start = time.time()for _ in range(1000):    msgspec.json.decode(json_bytes, type=list[User])msgspec_time = time.time() - startstart = time.time()for _ in range(1000):    json.loads(json_bytes)json_time = time.time() - startprint(f"\n[性能对比] 反序列化10000条数据1000次:")print(f"  msgspec: {msgspec_time:.2f} 秒")print(f"  json模块: {json_time:.2f} 秒")print(f"  msgspec快了约 {json_time/msgspec_time:.1f} 倍")

2. glom:像指路一样操作数据,告别嵌套循环

你是否写过一长串的字典键访问,比如 data['a']['b'][0]['c'],然后还要担心某个键不存在导致KeyErrorglom 让你能像描述路径一样,声明式地获取和转换深层嵌套的数据结构。

为什么是原型利器?

  • 意图清晰:代码直接表达“我想要什么数据”,而不是“我如何一步步去拿”。
  • 容错灵活:可以轻松处理路径中可能缺失的节点。
  • 转换强大:不仅能获取数据,还能在获取过程中进行重组。
from glom import glom, Coalesce, PathAccessError# 假设这是某个复杂API的返回结果api_response = {"status""success","data": {"users": [            {"profile": {"name""Alice""age"30"id"1}},            {"profile": {"name""Bob""id"2}},  # Bob 没有 age            {"profile": {"name""Charlie""age"25"id"3}}        ],"metadata": {"page"1"total"3}    }}# 场景1:提取所有用户名 (简单路径)usernames = glom(api_response, 'data.users.0.profile.name')print(f"第一个用户的名字: {usernames}")# 输出:Alice# 场景2:提取所有用户名 (迭代路径)all_names = glom(api_response, ('data.users', ['profile.name']))print(f"所有用户的名字: {all_names}")# 输出:['Alice', 'Bob', 'Charlie']# 场景3:安全地提取可能不存在的字段 (使用Coalesce)# 提取所有年龄,如果缺失则用-1填充ages = glom(api_response,             ('data.users', [Coalesce('profile.age', default=-1)]))print(f"所有用户的年龄(缺省为-1): {ages}")# 输出:[30, -1, 25]# 场景4:复杂重组:创建一个新的数据结构summary = glom(api_response, {'page''data.metadata.page','user_count': ('data.users', len),'user_list': ('data.users', [{'id''profile.id','name''profile.name'    }])})print(f"\n重组后的摘要信息:")print(summary)# 输出: {'page': 1, 'user_count': 3, 'user_list': [{'id': 1, 'name': 'Alice'}, ...]}

想象一下,如果没有glom,完成上面的数据提取和重组,你需要写多少层for循环和if判断?**glom让你用描述代替操作,极大解放了生产力。**

二、开发与调试:让原型“活”起来

原型开发不是一次性写完就跑。你需要快速迭代、即时看到变化、找到性能瓶颈。

3. watchfiles:文件监听,让开发循环“热”起来

你是否在开发Web应用、数据处理脚本或任何需要根据文件变化而重新运行的东西时,不得不手动停止、重启程序?watchfiles提供了跨平台、高性能的文件系统事件监听,让你轻松实现自动重载

为什么是原型利器?

  • 简单到难以置信:几行代码搞定文件监听。
  • 性能强劲:底层使用Rust,比纯Python实现快得多。
  • 应用场景广:用于开发服务器、构建工具、数据管道监控等。
from watchfiles import watchimport timeimport shutilprint("监控当前目录下的 .txt 文件变化 (运行后,请尝试创建或修改txt文件)...")# watch() 返回一个生成器,每次文件变化时 yield 一组变化for changes in watch('./', watch_filter=lambda change, path: path.endswith('.txt')):# changes 是一个集合,元素是 (change_type, file_path)for change_type, file_path in changes:        action = {1'新增'2'修改'3'删除'}.get(change_type, '未知')        print(f"[{time.strftime('%H:%M:%S')}] 文件 {action}{file_path}")# 这里可以触发你的重载逻辑,例如:# restart_dev_server()# reprocess_data_pipeline()    print("--- 监控持续中... (按 Ctrl+C 退出)---")# 运行这个脚本,然后在当前目录下创建一个新的 .txt 文件,或者修改现有的。# 观察控制台的输出。

4. beartype:运行时类型守护者

Python是动态类型语言,这给了我们灵活性,但也容易在运行时遇到TypeError或逻辑错误。虽然有了类型注解(Type Hints),但它们默认只在IDE和静态检查器(如mypy)中起作用。beartype 是一个近乎零开销的运行时类型检查装饰器,让你的类型注解在代码执行时也发挥作用。

为什么是原型利器?

  • 早期Bug捕获:在错误发生的第一现场就揪出它,而不是等到数据传到下游。
  • 增强信心:无需完整的测试套件,也能对函数接口的安全性有信心。
  • 性能无损:其检查机制非常高效,甚至可以在生产环境中保留。
from beartype import beartypefrom typing import List, Dict@beartypedefcalculate_stats(scores: List[float], weight: float) -> Dict[str, float]:"""计算平均分和加权总分。"""ifnot scores:return {"average"0.0"weighted_total"0.0}    average = sum(scores) / len(scores)    weighted_total = average * weightreturn {"average": average, "weighted_total": weighted_total}# 正常调用print(calculate_stats([85.590.078.5], 1.1))# 输出: {'average': 84.666..., 'weighted_total': 93.133...}# 触发类型错误 - beartype 会立即报错try:    calculate_stats([85"90"78.5], 1.1)  # 列表里混入了字符串except Exception as e:    print(f"\n捕获到类型错误: {type(e).__name__}{e}")# 输出: beartype.roar.BeartypeCallHintParamViolation: ...try:    calculate_stats([85.590.078.5], "heavy")  # weight 应该是数字except Exception as e:    print(f"捕获到类型错误: {type(e).__name__}{e}")

5. pyinstrument:一秒定位性能“元凶”

你的原型跑得很慢,但你不知道时间都花在哪了。cProfile的输出像天书?pyinstrument提供了一个清晰、直观、可读性极强的性能分析报告,帮你一眼找到最耗时的函数。

为什么是原型利器?

  • 开箱即用:无需复杂配置,包装你的代码即可。
  • 结果直观:以树状形式展示调用关系和耗时比例,一目了然。
  • 开销低:对程序运行速度影响小。
from pyinstrument import Profilerimport timeimport randomdefslow_function():"""一个模拟的慢函数,内部有很多无效循环。"""    time.sleep(0.1)  # 模拟IO等待# 一些低效的计算    data = [random.random() for _ in range(50000)]    sorted_data = sorted(data)  # 这里可能是个瓶颈return sum(sorted_data[::1000])  # 跳着求和deffast_function():"""一个模拟的快函数。"""    time.sleep(0.01)return42defmain_workflow():"""主要工作流,调用快慢函数。"""    total = 0for i in range(5):if i % 2 == 0:            total += slow_function()else:            total += fast_function()return total# 使用 Pyinstrument 进行分析profiler = Profiler()profiler.start()result = main_workflow()print(f"计算结果: {result}")profiler.stop()# 输出分析报告print("\n" + "="*50)print("Pyinstrument 性能分析报告")print("="*50)print(profiler.output_text(unicode=True, color=True))# 输出会清晰显示 `slow_function` 和内部的 `sorted` 调用占了大部分时间。

运行上面的代码,pyinstrument 会生成一个彩色的控制台报告,清晰地告诉你 main_workflow 的总时间,其中 slow_function 占了95%以上,而在 slow_function 内部,sorted 排序操作又是最耗时的部分。这比在cProfile的输出里大海捞针要高效得多。

三、数据处理与模拟:用“魔法”跳过繁琐设置

原型经常需要处理数据或依赖外部服务(如数据库、缓存)。搭建这些环境非常耗时。

6. duckdb:没有数据库的SQL分析引擎

想用强大的SQL查询来分析CSV、Parquet或Pandas DataFrame,但又不想安装配置PostgreSQL或MySQL?duckdb是一个进程内的OLAP数据库,让你可以直接对文件运行SQL,速度极快。

为什么是原型利器?

  • 零基础设施:无需安装、启动、管理数据库服务。
  • 语法强大:支持标准SQL和许多高级分析函数。
  • 无缝衔接:轻松与Pandas、CSV等数据源交互。
import duckdbimport pandas as pd# 1. 直接从 Pandas DataFrame 查询df = pd.DataFrame({'country': ['中国''美国''中国''英国''美国''中国'],'sales': [10015020080120300]})print("原始数据:")print(df)print("\n使用DuckDB查询(按国家统计总销售额):")result_df = duckdb.sql("""    SELECT         country,        SUM(sales) as total_sales,        AVG(sales) as avg_sales,        COUNT(*) as order_count    FROM df    GROUP BY country    ORDER BY total_sales DESC""").df()  # .df() 将结果转回Pandas DataFrameprint(result_df)# 2. 直接从 CSV 文件查询(无需先读入Pandas!)# 假设我们有一个 'sales.csv' 文件,内容同上。print("\n直接从CSV文件查询:")# 注意:此处为演示,实际需要先创建文件。你可以取消注释运行。# df.to_csv('sales.csv', index=False)# direct_result = duckdb.sql("SELECT country, SUM(sales) FROM 'sales.csv' GROUP BY country").df()# print(direct_result)

7. fakeredis:需要Redis?不,你只需要它的行为。

你的原型设计用到了Redis做缓存或队列,但你不想(或不能)在本地安装Redis服务器。fakeredis提供了一个纯Python实现的、与redis-py客户端API完全兼容的模拟器

为什么是原型利器?

  • 零依赖部署:你的脚本可以发给任何人直接运行。
  • 完美用于测试:行为一致,测试确定可重复。
  • 平滑迁移:原型验证后,只需更换连接地址,就能无缝切换到真实的Redis。
import fakeredisimport json# 创建模拟的Redis客户端 - 注意,这里没有服务器!cache = fakeredis.FakeRedis()# 使用方式和 redis-py 一模一样defget_user_profile(user_id: int):"""获取用户资料,使用缓存。"""    cache_key = f"user_profile:{user_id}"# 1. 尝试从缓存获取    cached_data = cache.get(cache_key)if cached_data:        print(f"缓存命中 for user {user_id}")return json.loads(cached_data)# 2. 模拟一个耗时的数据库查询    print(f"缓存未命中,查询数据库 for user {user_id}")    time.sleep(0.5)  # 模拟慢查询    user_data = {"id": user_id, "name"f"User{user_id}""score": user_id * 10}# 3. 写入缓存,设置5秒过期    cache.setex(cache_key, 5, json.dumps(user_data))    print(f"已缓存 user {user_id} 的数据")return user_data# 测试缓存逻辑print("第一次请求(会查数据库):")print(get_user_profile(1))print("\n立即第二次请求(应该从缓存读取):")print(get_user_profile(1))print("\n等待6秒后第三次请求(缓存已过期,会再次查数据库):")time.sleep(6)print(get_user_profile(1))# 你还可以测试其他Redis命令,如列表、集合等,它们都能工作。list_key = "my_list"cache.lpush(list_key, "task1""task2")print(f"\n模拟Redis列表操作: {cache.lrange(list_key, 0-1)}")

四、工程增强:把好用的轮子直接装上车

有些工具,你每次开始新项目都会忍不住重写一遍。不如直接用这些经过千锤百炼的。

8. boltons:你的“瑞士军刀”工具包

boltons是一个包含超过200个实用函数和类的集合,它们解决了标准库本应解决但没有的许多常见问题。从迭代工具、数据结构、调试辅助到文件处理,应有尽有。

为什么是原型利器?

  • 减少重复造轮子:不用再写 chunkedflattendefaults 等通用函数。
  • 代码更健壮:这些函数都经过大量实战测试。
  • 提升可读性:使用公认的工具名,让代码意图更清晰。
from boltons.iterutils import chunked, flatten, uniquefrom boltons.dictutils import OMD, FrozenDictfrom boltons.fileutils import atomic_saveimport json# 1. 迭代工具 - 分块big_list = list(range(20))print("分块处理:", list(chunked(big_list, 6)))# 输出: [(0,1,2,3,4,5), (6,7,8,9,10,11), ...]# 2. 迭代工具 - 扁平化 & 去重nested_list = [[1,2], [3, [4,5]], 6]flat_list = list(flatten(nested_list))print("扁平化:", flat_list)print("去重后:", list(unique([1,2,2,3,3,3])))# 3. 高级字典 - 有序多值字典 (OMD)# 允许一个键对应多个值,且保持插入顺序omd = OMD()omd.add('language''Python')omd.add('language''Java')omd.add('language''Go')print("\n有序多值字典:")print(list(omd.items()))  # 输出: [('language', 'Python'), ('language', 'Java'), ...]print(omd['language'])    # 获取最后一个值: 'Go'print(omd.getlist('language')) # 获取所有值: ['Python', 'Java', 'Go']# 4. 文件工具 - 原子保存(避免写入过程中程序崩溃导致文件损坏)data = {"project""prototype""status""awesome"}try:with atomic_save('config.json', text_mode=Trueas f:        json.dump(data, f, indent=2)    print("\n文件已原子性保存到 'config.json'")except Exception as e:    print(f"保存失败,原文件未损坏: {e}")

9. returns:让错误处理成为设计的一部分

在原型中,我们常常用try...except包裹一切,但错误逻辑很容易变得混乱,与成功逻辑纠缠不清。returns库引入了函数式编程中的“容器”概念(如ResultMaybe),强制你显式地处理成功和失败,让流程更清晰、可组合。

为什么是原型利器?

  • 显式优于隐式:函数签名直接告诉你可能失败,并返回什么错误。
  • 鼓励组合:提供了丰富的工具(bindmap)来安全地串联可能失败的操作。
  • 减少Bug:很难意外地忽略错误情况。
from returns.result import Result, Success, Failurefrom returns.pipeline import flowfrom returns.pointfree import bind# 传统方式:异常藏在深处,调用者必须知道可能抛出哪些异常defparse_divide_1(a_str: str, b_str: str) -> float:    a = int(a_str)    b = int(b_str)return a / b# 使用 returns.Result:成功/失败路径一目了然defparse_int(value: str) -> Result[int, str]:"""将字符串解析为整数,返回成功或失败的结果容器。"""try:return Success(int(value))except ValueError:return Failure(f"无法解析为整数: '{value}'")defsafe_divide(a: int, b: int) -> Result[float, str]:"""安全除法,返回成功或失败的结果容器。"""if b == 0:return Failure("除数不能为零")return Success(a / b)# 组合操作:解析两个数,然后做除法defparse_divide_2(a_str: str, b_str: str) -> Result[float, str]:# 使用 flow 进行管道式组合return flow(        parse_int(a_str),          # Result[int, str]        bind(lambda a: parse_int(b_str).bind(lambda b: safe_divide(a, b)  # 将两个结果绑定到除法        ))    )# 也可以用 for 推导式,更直观:# def _():#    a = yield parse_int(a_str)#    b = yield parse_int(b_str)#    yield safe_divide(a, b)# 但这里我们用 flow+bind 演示# 测试test_cases = [("10""2"), ("ten""2"), ("10""0"), ("10""2.5")]for a, b in test_cases:    print(f"\n计算 {a} / {b}:")    result = parse_divide_2(a, b)# 显式处理结果    result.match(# 成功时处理值        on_success=lambda value: print(f"  成功: 结果 = {value}"),# 失败时处理错误信息        on_failure=lambda err_msg: print(f"  失败: 原因 = {err_msg}")    )

使用returns后,你的函数就像一个有明确指示牌的管道:要么成功带着数据流向下游,要么失败带着错误信息中止。调用者无法忽视错误,整个数据流的健壮性在原型阶段就被大大提升了。

写在最后

原型开发的核心矛盾是:我们需要快速验证想法的核心逻辑,但又不得不花费大量时间处理基础设施、数据边界和错误处理。

这9个库,正是为了解决这个矛盾而生。它们从不同角度切入:

  • msgspec/glom 处理数据边界,让你干净利落地进出。
  • watchfiles/beartype/pyinstrument 优化开发循环,让你改得快、写得稳、查得准。
  • duckdb/fakeredis 模拟外部依赖,让你跳过繁琐的环境搭建。
  • boltons/returns 提供工程模式,让你的原型代码从一开始就结构清晰、健壮可靠。

它们的共同点是:不炫技,只解决实际问题;不臃肿,只提供你最需要的那部分功能。

下次当你开始一个新点子时,不妨先想想:“哪个环节最繁琐?有没有一个库能把它干掉?” 很可能,答案就在今天的清单里。

效率的提升,往往不是来自于更快的编码手速,而是来自于更聪明的选择。

你最常用的那个“效率神器”是什么?欢迎在评论区分享,一起扩充我们的武器库!

🏴‍☠️宝藏级🏴‍☠️ 原创公众号『数据STUDIO』内容超级硬核。公众号以Python为核心语言,垂直于数据科学领域,包括可戳👉PythonMySQL数据分析数据可视化机器学习与数据挖掘爬虫等,从入门到进阶!

长按👇关注- 数据STUDIO -设为星标,干货速递

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 13:46:42 HTTP/2.0 GET : https://f.mffb.com.cn/a/473614.html
  2. 运行时间 : 0.434151s [ 吞吐率:2.30req/s ] 内存消耗:4,572.54kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=c2c5b01c47c0da8d9c02c347647da856
  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.000711s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000905s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.024074s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.012589s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000575s ]
  6. SELECT * FROM `set` [ RunTime:0.005656s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000591s ]
  8. SELECT * FROM `article` WHERE `id` = 473614 LIMIT 1 [ RunTime:0.017728s ]
  9. UPDATE `article` SET `lasttime` = 1770443203 WHERE `id` = 473614 [ RunTime:0.001853s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000781s ]
  11. SELECT * FROM `article` WHERE `id` < 473614 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003750s ]
  12. SELECT * FROM `article` WHERE `id` > 473614 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000849s ]
  13. SELECT * FROM `article` WHERE `id` < 473614 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.178907s ]
  14. SELECT * FROM `article` WHERE `id` < 473614 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.018179s ]
  15. SELECT * FROM `article` WHERE `id` < 473614 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.019613s ]
0.435893s