Python Standard Library Encyclopedia

The following is a complete list of Python standard libraries

text

string: general string operations

re: regular expression operations

difflib: difference calculation tool

textwrap: text padding

unicodedata: Unicode character database

stringprep: Internet string preparation tool

readline: GNU read interface by line

rlcompleter: the implementation function of GNU reading by line

binary data

struct: parse bytes into packed binary data

codecs: registry and base class codecs

type of data

datetime: based on date and time tools

calendar: general month function

collections: container data type

collections.abc: container virtual base class

heapq: heap queue algorithm

bisect: array binary algorithm

array: Efficient numeric array

weakref: weak reference

types: dynamic creation and naming of built-in types

copy: shallow copy and deep copy

pprint: formatted output

reprlib: implementation of alternate repr()

math

numbers: Virtual base class for numeric values

math: mathematical function

cmath: Mathematical functions for complex numbers

decimal: fixed-point and floating-point calculations

fractions: rational numbers

random: generate pseudo-random numbers

functional programming

itertools: generate iterators for efficient loops

functools: higher-order functions and operations on callable objects

operator: standard operation for the function

Files and Directories

os.path: Generic pathname control

fileinput: iterate over lines from multiple input streams

stat: Interpret the results of stat()

filecmp: comparison function for files and directories

tempfile: generate temporary files and directories

glob: an extension to the Unix-style pathname format

fnmatch: Unix-style pathname format comparison

linecache: random storage of text lines

shutil: advanced file operations

macpath: MacOS 9 path control functions

Persistence

pickle: Python object serialization

copyreg: registration machine support function for pickle

shelve: Python object persistence

marshal: internal Python object serialization

dbm: Unix "database" interface

sqlite3: API2.0 for SQLite database

compression

zlib: gzip-compatible compression

gzip: support for gzip files

bz2: support for bzip2 compression

lzma: Compression using the LZMA algorithm

zipfile: Manipulate ZIP archives

tarfile: read and write tar archive files

file format

csv: Read and write CSV files

configparser: configuration file parser

netrc: netrc file handler

xdrlib: XDR data encoding and decoding

plistlib: generate and parse Mac OS X .plist files

encryption

hashlib: secure hashing and message digests

hmac: keyed hash for message authentication

operating system tools

os: multifaceted operating system interface

io: stream core tools

time: query and conversion of time

argparser: parser for command line options, arguments and subcommands

optparser: command line option parser

getopt: C-style command-line option parser

logging: Python logging tool

logging.config: log configuration

logging.handlers: log handlers

getpass: simple password input

curses: terminal handling for character display

curses.textpad: text input field for the curses program

curses.ascii: ASCII character set tools

curses.panel: curses control stack extension

platform: access the underlying platform authentication data

errno: standard error notation

ctypes: Python foreign function library

concurrency

threading: thread-based parallelism

multiprocessing: process-based parallelism

concurrent: concurrent package

concurrent.futures: start parallel tasks

subprocess: subprocess management

sched: event scheduling

queue: Synchronization queue

select: wait for I/O to complete

dummy_threading: an alternative to the threading module (when _thread is not available)

_thread: The underlying thread API (threading is based on it)

_dummy_thread: an alternative to the _thread module (when _thread is not available)

interprocess communication

socket: the underlying network interface

ssl: TLS/SSL shim for socket objects

asyncore: Asynchronous socket processor

asynchat: Asynchronous socket command/response handler

signal: asynchronous transaction signal handler

mmap: memory-mapped file support

the Internet

email: mail and MIME processing package

json: JSON encoding and decoding

mailcap: mailcap file processing

mailbox: Multiple format control mailboxes

mimetypes: file name and MIME type mapping

base64:RFC

3548: Base16, Base32, Base64 encoding

binhex: binhex4 file encoding and decoding

binascii: conversion between binary code and ASCII code

quopri:MIME

quoted - Encoding and decoding of printable data

uu: encoding and decoding of uuencode files

HTML and XML

html: HTML support

html.parser: Simple HTML and XHTML parser

html.entities: Definition of HTML common entities

xml: XML processing module

xml.etree.ElementTree: tree XML element API

xml.dom:XML DOM API

xml.dom.minidom: XML DOM minimum spanning tree

xml.dom.pulldom: support for building partial DOM trees

xml.sax: support for SAX2 parsing

xml.sax.handler: SAX processor base class

xml.sax.saxutils: SAX tools

xml.sax.xmlreader: SAX parser interface

xml.parsers.expat: use Expat to quickly parse XML

Internet Protocols and Support

webbrowser: Simple web browser controller

cgi: CGI support

cgitb: CGI script backtracking manager

wsgiref: WSGI tool and reference implementation

urllib: URL processing module

urllib.request: an extension library for opening URL connections

urllib.response: the response class of the urllib module

urllib.parse: Parses URLs into components

urllib.error: exception class raised by urllib.request

urllib.robotparser: parser for robots.txt

http: HTTP module

http.client: HTTP protocol client

ftplib: FTP protocol client

poplib: POP protocol client

imaplib: IMAP4 protocol client

nntplib: NNTP protocol client

smtplib: SMTP protocol client

smtpd: SMTP server

telnetlib: Telnet client

uuid: RFC4122 UUID object

socketserver: web server framework

http.server: HTTP server

http.cookies: HTTP Cookie state manager

http.cookiejar: HTTP client cookie handling

xmlrpc: XML - RPC server and client module

xmlrpc.client: XML - RPC client access

xmlrpc.server: XML-RPC Server Basics

ipaddress: IPv4/IPv6 control library

multimedia

audioop: processing raw audio data

aifc: Read and write AIFF and AIFC files

sunau: Read and write Sun AU files

wave: read and write WAV files

chunk: read IFF large files

colorsys: conversion between color systems

imghdr: Specifies the image type

sndhdr: Specifies the sound file type

ossaudiodev: Access OSS compatible audio devices

globalization

gettext: multilingual internationalization service

locale: internationalization service

programming framework

turtle: Turtle graphics library

cmd: line-based command interpreter support

shlex: simple dictionary analysis

Tk graphical user interface

tkinter: Tcl/Tk interface

tkinter.ttk: Tk themed controls

tkinter.tix: Tk extension controls

tkinter.scrolledtext: Scroll text control

development tools

pydoc: documentation generator and online help system

doctest: interactive Python examples

unittest: unit testing framework

unittest.mock: mock object library

test: Python regression testing package

test.support: Python test toolkit

venv: virtual environment construction

debugging

bdb: Debug framework

faulthandler: Python backtracking library

pdb: Python debugger

timeit: small piece of code execution time measurement

trace: Python execution state tracking

Runtime

sys: system-related parameters and functions

sysconfig: Access Python configuration information

builtins: built-in objects

main: the top-level scripting environment

warnings: warning control

contextlib: contextual tools for with states

abc: virtual base class

atexit: exit handler

traceback: print or read a backtrace of the stack

future: future state definition

gc: garbage collection interface

inspect: inspect live objects

site: site-related configuration hook (hook)

fpectl: floating-point exception control

distutils: Generate and install Python modules

interpreter

code: base class interpreter

codeop: Compile Python code

import module

imp: access the internals of the import module

zipimport: Import modules from ZIP archives

pkgutil: package extension tool

modulefinder: find modules by script

runpy: Locate and execute Python modules

importlib: an implementation of import

Python language

parser: Access the Python parse tree

ast: abstract syntax tree

symtable: access compiler symbol table

symbol: a constant in the Python parse tree

token: a constant in the Python parse tree

keyword: Python keyword test

tokenize: Python source file word segmentation

tabnany: fuzzy indentation detection

pyclbr: Python class browsing support

py_compile: Compile Python source files

compileall: Compile Python libraries byte-wise

dis: disassembler for Python bytecode

pickletools: serialization development tools

other

formatter: general formatted output

Windows-related

msilib: Read and write Windows Installer files

msvcrt: Useful programs for MS VC++ Runtime

winreg: Windows registry access

winsound: Windows sound playback interface

Unix related

posix: the most commonly used POSIX calls

pwd: password database

spwd: shadow password database

grp: group database

crypt: Unix password authentication

termios: POSIX-style tty control

tty: terminal control function

pty: pseudo terminal tool

fcntl: system calls fcntl() and ioctl()

pipes: shell pipeline interface

resource: Resource availability information

nis: Sun's NIS interface

syslog: Unix logging service

Guess you like

Origin blog.csdn.net/gxlcf_516312/article/details/126618944