For AI agents: the complete documentation index is available at https://heyq02.com/llms.txt, the full documentation bundle is available at https://heyq02.com/llms-full.txt, and this page is available as Markdown at https://heyq02.com/blog/posts/python-310-standard-library-links.md.
跳到主要内容

Python 3.10 标准库全集(官方链接)

预计阅读时间: 14 分钟

做比赛时竞赛方常常会对选手使用的第三方库进行限制,然而,博主往往对于自己使用的库到底是标准库还是第三方库感到疑惑。即使查找百度,有些库也不能给出明确的答案,因此,博主找到了最新的python3.10.3官方稳定供大家参考,只要不在这个里面的就是第三方库。

一、官方链接

Python 标准库 — Python 3.10.3 文档

不需要挂VP,点击即可

二、标准库排序

如果仅仅想查找某一模块是不是标准库,博主也按照首字母排序整理好了全部标准库供大家参考:

future — Future statement definitions__main__ — Top-level code environment_thread — Low-level threading API2to3 - Automated Python 2 to 3 code translationabc — Abstract Base Classesaifc — Read and write AIFF and AIFC filesargparse — Parser for command-line options, arguments and sub-commandsarray — Efficient arrays of numeric valuesast — Abstract Syntax Treesasynchat — Asynchronous socket command/response handlerasyncio — Asynchronous I/Oasyncore — Asynchronous socket handleratexit — Exit handlersaudioop — Manipulate raw audio dataAudit events tableBad file descriptor error examplebase64 — Base16, Base32, Base64, Base85 Data Encodingsbdb — Debugger frameworkbinascii — Convert between binary and ASCIIbinhex — Encode and decode binhex4 filesbisect — Array bisection algorithmbuiltins — Built-in objectsbz2 — Support for bzip2 compressioncalendar — General calendar-related functionscgi — Common Gateway Interface supportcgitb — Traceback manager for CGI scriptschunk — Read IFF chunked datacmath — Mathematical functions for complex numberscmd — Support for line-oriented command interpreterscode — Interpreter base classescodecs — Codec registry and base classescodeop — Compile Python codecollections — Container datatypescollections.abc — Abstract Base Classes for Containerscolorsys — Conversions between color systemscompileall — Byte-compile Python librariesconcurrent.futures — Launching parallel tasksconfigparser — Configuration file parsercontextlib — Utilities for with-statement contextscontextvars — Context Variablescopy — Shallow and deep copy operationscopyreg — Register pickle support functionscrypt — Function to check Unix passwordscsv — CSV File Reading and Writingctypes — A foreign function library for Pythoncurses — Terminal handling for character-cell displayscurses.ascii — Utilities for ASCII characterscurses.panel — A panel stack extension for cursescurses.textpad — Text input widget for curses programsdataclasses — Data Classesdatetime — Basic date and time typesdbm — Interfaces to Unix “databases”decimal — Decimal fixed point and floating point arithmeticdifflib — Helpers for computing deltasdis — Disassembler for Python bytecodedistutils — Building and installing Python modulesdoctest — Test interactive Python examplesEffects of the Python Development Modeemail — An email and MIME handling packageensurepip — Bootstrapping the pip installerenum — Support for enumerationserrno — Standard errno system symbolsfaulthandler — Dump the Python tracebackfcntl — The fcntl and ioctl system callsfilecmp — File and Directory Comparisonsfileinput — Iterate over lines from multiple input streamsfnmatch — Unix filename pattern matchingfractions — Rational numbersftplib — FTP protocol clientfunctools — Higher-order functions and operations on callable objectsgc — Garbage Collector interfacegetopt — C-style parser for command line optionsgetpass — Portable password inputgettext — Multilingual internationalization servicesglob — Unix style pathname pattern expansiongraphlib — Functionality to operate with graph-like structuresgrp — The group databasegzip — Support for gzip fileshashlib — Secure hashes and message digestsheapq — Heap queue algorithmhmac — Keyed-Hashing for Message Authenticationhtml — HyperText Markup Language supporthtml.entities — Definitions of HTML general entitieshtml.parser — Simple HTML and XHTML parserhttp — HTTP moduleshttp.client — HTTP protocol clienthttp.cookiejar — Cookie handling for HTTP clientshttp.cookies — HTTP state managementhttp.server — HTTP serversIDLEimaplib — IMAP4 protocol clientimghdr — Determine the type of an imageimp — Access the import internalsimportlib — The implementation of importinspect — Inspect live objectsio — Core tools for working with streamsipaddress — IPv4/IPv6 manipulation libraryitertools — Functions creating iterators for efficient loopingjson — JSON encoder and decoderkeyword — Testing for Python keywordslinecache — Random access to text lineslocale — Internationalization serviceslogging — Logging facility for Pythonlogging.config — Logging configurationlogging.handlers — Logging handlerslzma — Compression using the LZMA algorithmmailbox — Manipulate mailboxes in various formatsmailcap — Mailcap file handlingmarshal — Internal Python object serializationmath — Mathematical functionsmimetypes — Map filenames to MIME typesmmap — Memory-mapped file supportmodulefinder — Find modules used by a scriptmsilib — Read and write Microsoft Installer filesmsvcrt — Useful routines from the MS VC++ runtimemultiprocessing — Process-based parallelismmultiprocessing.shared_memory — Provides shared memory for direct access across processesnetrc — netrc file processingnis — Interface to Sun’s NIS (Yellow Pages)nntplib — NNTP protocol clientnumbers — Numeric abstract base classesoperator — Standard operators as functionsoptparse — Parser for command line optionsos — Miscellaneous operating system interfacesos.path — Common pathname manipulationsossaudiodev — Access to OSS-compatible audio devicespathlib — Object-oriented filesystem pathspdb — The Python Debuggerpickle — Python object serializationpickletools — Tools for pickle developerspipes — Interface to shell pipelinespkgutil — Package extension utilityplatform — Access to underlying platform’s identifying dataplistlib — Generate and parse Apple .plist filespoplib — POP3 protocol clientposix — The most common POSIX system callspprint — Data pretty printerpty — Pseudo-terminal utilitiespwd — The password databasepy_compile — Compile Python source filespyclbr — Python module browser supportpydoc — Documentation generator and online help systemPython Development Modequeue — A synchronized queue classquopri — Encode and decode MIME quoted-printable datarandom — Generate pseudo-random numbersre — Regular expression operationsreadline — GNU readline interfacereprlib — Alternate repr() implementationresource — Resource usage informationResourceWarning Examplerlcompleter — Completion function for GNU readlinerunpy — Locating and executing Python modulessched — Event schedulersecrets — Generate secure random numbers for managing secretsselect — Waiting for I/O completionselectors — High-level I/O multiplexingshelve — Python object persistenceshlex — Simple lexical analysisshutil — High-level file operationssignal — Set handlers for asynchronous eventssite — Site-specific configuration hooksmtpd — SMTP Serversmtplib — SMTP protocol clientsndhdr — Determine type of sound filesocket — Low-level networking interfacesocketserver — A framework for network serversspwd — The shadow password databasesqlite3 — DB-API 2.0 interface for SQLite databasesssl — TLS/SSL wrapper for socket objectsstat — Interpreting stat() resultsstatistics — Mathematical statistics functionsstring — Common string operationsstringprep — Internet String Preparationstruct — Interpret bytes as packed binary datasubprocess — Subprocess managementsunau — Read and write Sun AU filessymtable — Access to the compiler’s symbol tablessys — System-specific parameters and functionssysconfig — Provide access to Python’s configuration informationsyslog — Unix syslog library routinestabnanny — Detection of ambiguous indentationtarfile — Read and write tar archive filestelnetlib — Telnet clienttempfile — Generate temporary files and directoriestermios — POSIX style tty controltest — Regression tests package for Pythontest.support — Utilities for the Python test suitetest.support.bytecode_helper — Support tools for testing correct bytecode generationtest.support.import_helper — Utilities for import teststest.support.os_helper — Utilities for os teststest.support.script_helper — Utilities for the Python execution teststest.support.socket_helper — Utilities for socket teststest.support.threading_helper — Utilities for threading teststest.support.warnings_helper — Utilities for warnings teststextwrap — Text wrapping and fillingThe Python ProfilersThe concurrent packagethreading — Thread-based parallelismtime — Time access and conversionstimeit — Measure execution time of small code snippetsTkinter Dialogstkinter — Python interface to Tcl/Tktkinter.colorchooser — Color choosing dialogtkinter.dnd — Drag and drop supporttkinter.font — Tkinter font wrappertkinter.messagebox — Tkinter message promptstkinter.scrolledtext — Scrolled Text Widgettkinter.tix — Extension widgets for Tktkinter.ttk — Tk themed widgetstoken — Constants used with Python parse treestokenize — Tokenizer for Python sourcetrace — Trace or track Python statement executiontraceback — Print or retrieve a stack tracebacktracemalloc — Trace memory allocationstty — Terminal control functionsturtle — Turtle graphicstypes — Dynamic type creation and names for built-in typestyping — Support for type hintsunicodedata — Unicode Databaseunittest — Unit testing frameworkunittest.mock — getting startedunittest.mock — mock object libraryurllib — URL handling modulesurllib.error — Exception classes raised by urllib.requesturllib.parse — Parse URLs into componentsurllib.request — Extensible library for opening URLsurllib.response — Response classes used by urlliburllib.robotparser — Parser for robots.txtUsing importlib.metadatauu — Encode and decode uuencode filesuuid — UUID objects according to RFC 4122venv — Creation of virtual environmentswarnings — Warning controlwave — Read and write WAV filesweakref — Weak referenceswebbrowser — Convenient web-browser controllerwinreg — Windows registry accesswinsound — Sound-playing interface for Windowswsgiref — WSGI Utilities and Reference Implementationxdrlib — Encode and decode XDR dataXML Processing Modulesxml.dom — The Document Object Model APIxml.dom.minidom — Minimal DOM implementationxml.dom.pulldom — Support for building partial DOM treesxml.etree.ElementTree — The ElementTree XML APIxml.parsers.expat — Fast XML parsing using Expatxml.sax — Support for SAX2 parsersxml.sax.handler — Base classes for SAX handlersxml.sax.saxutils — SAX Utilitiesxml.sax.xmlreader — Interface for XML parsersxmlrpc — XMLRPC server and client modulesxmlrpc.client — XML-RPC client accessxmlrpc.server — Basic XML-RPC serverszipapp — Manage executable Python zip archiveszipfile — Work with ZIP archiveszipimport — Import modules from Zip archiveszlib — Compression compatible with gzipzoneinfo — IANA time zone support__future__ — Future statement definitions__main__ — Top-level code environment_thread — Low-level threading API2to3 - Automated Python 2 to 3 code translationabc — Abstract Base Classesaifc — Read and write AIFF and AIFC filesargparse — Parser for command-line options, arguments and sub-commandsarray — Efficient arrays of numeric valuesast — Abstract Syntax Treesasynchat — Asynchronous socket command/response handlerasyncio — Asynchronous I/Oasyncore — Asynchronous socket handleratexit — Exit handlersaudioop — Manipulate raw audio dataAudit events tableBad file descriptor error examplebase64 — Base16, Base32, Base64, Base85 Data Encodingsbdb — Debugger frameworkbinascii — Convert between binary and ASCIIbinhex — Encode and decode binhex4 filesbisect — Array bisection algorithmbuiltins — Built-in objectsbz2 — Support for bzip2 compressioncalendar — General calendar-related functionscgi — Common Gateway Interface supportcgitb — Traceback manager for CGI scriptschunk — Read IFF chunked datacmath — Mathematical functions for complex numberscmd — Support for line-oriented command interpreterscode — Interpreter base classescodecs — Codec registry and base classescodeop — Compile Python codecollections — Container datatypescollections.abc — Abstract Base Classes for Containerscolorsys — Conversions between color systemscompileall — Byte-compile Python librariesconcurrent.futures — Launching parallel tasksconfigparser — Configuration file parsercontextlib — Utilities for with-statement contextscontextvars — Context Variablescopy — Shallow and deep copy operationscopyreg — Register pickle support functionscrypt — Function to check Unix passwordscsv — CSV File Reading and Writingctypes — A foreign function library for Pythoncurses — Terminal handling for character-cell displayscurses.ascii — Utilities for ASCII characterscurses.panel — A panel stack extension for cursescurses.textpad — Text input widget for curses programsdataclasses — Data Classesdatetime — Basic date and time typesdbm — Interfaces to Unix “databases”decimal — Decimal fixed point and floating point arithmeticdifflib — Helpers for computing deltasdis — Disassembler for Python bytecodedistutils — Building and installing Python modulesdoctest — Test interactive Python examplesEffects of the Python Development Modeemail — An email and MIME handling packageensurepip — Bootstrapping the pip installerenum — Support for enumerationserrno — Standard errno system symbolsfaulthandler — Dump the Python tracebackfcntl — The fcntl and ioctl system callsfilecmp — File and Directory Comparisonsfileinput — Iterate over lines from multiple input streamsfnmatch — Unix filename pattern matchingfractions — Rational numbersftplib — FTP protocol clientfunctools — Higher-order functions and operations on callable objectsgc — Garbage Collector interfacegetopt — C-style parser for command line optionsgetpass — Portable password inputgettext — Multilingual internationalization servicesglob — Unix style pathname pattern expansiongraphlib — Functionality to operate with graph-like structuresgrp — The group databasegzip — Support for gzip fileshashlib — Secure hashes and message digestsheapq — Heap queue algorithmhmac — Keyed-Hashing for Message Authenticationhtml — HyperText Markup Language supporthtml.entities — Definitions of HTML general entitieshtml.parser — Simple HTML and XHTML parserhttp — HTTP moduleshttp.client — HTTP protocol clienthttp.cookiejar — Cookie handling for HTTP clientshttp.cookies — HTTP state managementhttp.server — HTTP serversIDLEimaplib — IMAP4 protocol clientimghdr — Determine the type of an imageimp — Access the import internalsimportlib — The implementation of importinspect — Inspect live objectsio — Core tools for working with streamsipaddress — IPv4/IPv6 manipulation libraryitertools — Functions creating iterators for efficient loopingjson — JSON encoder and decoderkeyword — Testing for Python keywordslinecache — Random access to text lineslocale — Internationalization serviceslogging — Logging facility for Pythonlogging.config — Logging configurationlogging.handlers — Logging handlerslzma — Compression using the LZMA algorithmmailbox — Manipulate mailboxes in various formatsmailcap — Mailcap file handlingmarshal — Internal Python object serializationmath — Mathematical functionsmimetypes — Map filenames to MIME typesmmap — Memory-mapped file supportmodulefinder — Find modules used by a scriptmsilib — Read and write Microsoft Installer filesmsvcrt — Useful routines from the MS VC++ runtimemultiprocessing — Process-based parallelismmultiprocessing.shared_memory — Provides shared memory for direct access across processesnetrc — netrc file processingnis — Interface to Sun’s NIS (Yellow Pages)nntplib — NNTP protocol clientnumbers — Numeric abstract base classesoperator — Standard operators as functionsoptparse — Parser for command line optionsos — Miscellaneous operating system interfacesos.path — Common pathname manipulationsossaudiodev — Access to OSS-compatible audio devicespathlib — Object-oriented filesystem pathspdb — The Python Debuggerpickle — Python object serializationpickletools — Tools for pickle developerspipes — Interface to shell pipelinespkgutil — Package extension utilityplatform — Access to underlying platform’s identifying dataplistlib — Generate and parse Apple .plist filespoplib — POP3 protocol clientposix — The most common POSIX system callspprint — Data pretty printerpty — Pseudo-terminal utilitiespwd — The password databasepy_compile — Compile Python source filespyclbr — Python module browser supportpydoc — Documentation generator and online help systemPython Development Modequeue — A synchronized queue classquopri — Encode and decode MIME quoted-printable datarandom — Generate pseudo-random numbersre — Regular expression operationsreadline — GNU readline interfacereprlib — Alternate repr() implementationresource — Resource usage informationResourceWarning Examplerlcompleter — Completion function for GNU readlinerunpy — Locating and executing Python modulessched — Event schedulersecrets — Generate secure random numbers for managing secretsselect — Waiting for I/O completionselectors — High-level I/O multiplexingshelve — Python object persistenceshlex — Simple lexical analysisshutil — High-level file operationssignal — Set handlers for asynchronous eventssite — Site-specific configuration hooksmtpd — SMTP Serversmtplib — SMTP protocol clientsndhdr — Determine type of sound filesocket — Low-level networking interfacesocketserver — A framework for network serversspwd — The shadow password databasesqlite3 — DB-API 2.0 interface for SQLite databasesssl — TLS/SSL wrapper for socket objectsstat — Interpreting stat() resultsstatistics — Mathematical statistics functionsstring — Common string operationsstringprep — Internet String Preparationstruct — Interpret bytes as packed binary datasubprocess — Subprocess managementsunau — Read and write Sun AU filessymtable — Access to the compiler’s symbol tablessys — System-specific parameters and functionssysconfig — Provide access to Python’s configuration informationsyslog — Unix syslog library routinestabnanny — Detection of ambiguous indentationtarfile — Read and write tar archive filestelnetlib — Telnet clienttempfile — Generate temporary files and directoriestermios — POSIX style tty controltest — Regression tests package for Pythontest.support — Utilities for the Python test suitetest.support.bytecode_helper — Support tools for testing correct bytecode generationtest.support.import_helper — Utilities for import teststest.support.os_helper — Utilities for os teststest.support.script_helper — Utilities for the Python execution teststest.support.socket_helper — Utilities for socket teststest.support.threading_helper — Utilities for threading teststest.support.warnings_helper — Utilities for warnings teststextwrap — Text wrapping and fillingThe Python ProfilersThe concurrent packagethreading — Thread-based parallelismtime — Time access and conversionstimeit — Measure execution time of small code snippetsTkinter Dialogstkinter — Python interface to Tcl/Tktkinter.colorchooser — Color choosing dialogtkinter.dnd — Drag and drop supporttkinter.font — Tkinter font wrappertkinter.messagebox — Tkinter message promptstkinter.scrolledtext — Scrolled Text Widgettkinter.tix — Extension widgets for Tktkinter.ttk — Tk themed widgetstoken — Constants used with Python parse treestokenize — Tokenizer for Python sourcetrace — Trace or track Python statement executiontraceback — Print or retrieve a stack tracebacktracemalloc — Trace memory allocationstty — Terminal control functionsturtle — Turtle graphicstypes — Dynamic type creation and names for built-in typestyping — Support for type hintsunicodedata — Unicode Databaseunittest — Unit testing frameworkunittest.mock — getting startedunittest.mock — mock object libraryurllib — URL handling modulesurllib.error — Exception classes raised by urllib.requesturllib.parse — Parse URLs into componentsurllib.request — Extensible library for opening URLsurllib.response — Response classes used by urlliburllib.robotparser — Parser for robots.txtUsing importlib.metadatauu — Encode and decode uuencode filesuuid — UUID objects according to RFC 4122venv — Creation of virtual environmentswarnings — Warning controlwave — Read and write WAV filesweakref — Weak referenceswebbrowser — Convenient web-browser controllerwinreg — Windows registry accesswinsound — Sound-playing interface for Windowswsgiref — WSGI Utilities and Reference Implementationxdrlib — Encode and decode XDR dataXML Processing Modulesxml.dom — The Document Object Model APIxml.dom.minidom — Minimal DOM implementationxml.dom.pulldom — Support for building partial DOM treesxml.etree.ElementTree — The ElementTree XML APIxml.parsers.expat — Fast XML parsing using Expatxml.sax — Support for SAX2 parsersxml.sax.handler — Base classes for SAX handlersxml.sax.saxutils — SAX Utilitiesxml.sax.xmlreader — Interface for XML parsersxmlrpc — XMLRPC server and client modulesxmlrpc.client — XML-RPC client accessxmlrpc.server — Basic XML-RPC serverszipapp — Manage executable Python zip archiveszipfile — Work with ZIP archiveszipimport — Import modules from Zip archiveszlib — Compression compatible with gzipzoneinfo — IANA time zone support