Python 标准库

常用库总结

  • 基础必会

    • 文件、系统:os、os.path、sys、io
    • 目录处理:pathlib、glob、fnmatch、shutil
    • 基本数学计算:math、random、statistics
    • 时间、日期:time、datetime、date、timedelta、calendar
    • 文件内容管理:filecmp、hashlib、tarfile、zipfile
    • 综合:re、json、pickle、logging、unittest、pprint
    • 网络:urllib、socket、http、asyncio
  • 进阶掌握

    • 进程、线程、协程:threading、multiprocessing、concurrent、queue、asyncio

    • 函数式:itertools、functools

    • 数据科学:numpy、pandas、matplotlib、seaborn、scikit-learn

    • 数据库:pymysql、pymongo、redis、elasticsearch

应用场景

  • Web 开发
  • 用户图形接口(GUI)
  • 数值计算和科学计算
  • 爬虫
  • 网络编程
  • 自动化运维
  • 自动化测试
  • 机器学习
  • 人工智能
  • ······

拓展阅读

官网文档(可选中文版)

优质资源

PyMOTW-3 is a series of articles written by Doug Hellmann to demonstrate how to use the modules of the Python 3 standard library. It is based on the original PyMOTW series, which covered Python 2.7. See About Python Module of the Week for details including the version of Python and tools used.

A curated list of awesome Python frameworks, libraries, software and resources https://awesome-python.com/

Python资源大全中文版,包括:Web框架、网络爬虫、模板引擎、数据库、数据可视化、图片处理等,由伯乐在线持续更新。

学习建议&指导