string: General string operation
re: regular expression operation
difflib: difference calculation tool
textwrap: text filling
unicodedata: Unicode character database
stringprep: Internet string preparation tool
readline: GNU read line by line interface
rlcompleter: GNU read-by-line implementation function
struct: Parse bytes into packed binary data
codecs: Codecs for registry and base classes
datetime: date and time based tools
calendar: general month function
collections: container data type
collections.abc: container virtual base class
heapq: heap queue algorithm
bisect: array dichotomy algorithm
array: efficient numeric array
weakref: weak reference
types: Dynamic creation and naming of built-in types
copy: shallow copy and deep copy
reprlib: alternate repr() implementation
numbers: virtual base class for numbers
math: mathematical function
cmath: mathematical function of complex numbers
decimal: fixed-point and floating-point calculations
fractions: rational number
random: Generate pseudo-random numbers
itertools: Generate iterators for efficient loops
functools: higher-order functions and operations on callable objects
operator: standard operations for functions
os.path: General path name control
fileinput: Traverse lines from multiple input streams
stat: explain the result of stat()
filecmp: Comparison function of files and directories
tempfile: Generate temporary files and directories
glob: Unix-style path name format extension
fnmatch: Unix-style path name format comparison
linecache: random storage of text lines
shutil: advanced file operations
macpath: MacOS 9 path control function
pickle: Python object serialization
copyreg: the support function of the registration machine for pickle
shelve: Python object persistence
marshal: internal Python object serialization
dbm: Unix "database" interface
sqlite3: API2.0 for SQLite database
zlib: Compatible with gzip 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
hashlib: secure hash and message digest
hmac: key hash for message authentication
os: Various operating system interfaces
io: Streaming core tool
time: query and conversion of time
argparser: a 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 handler
getpass: simple password input
curses: terminal processing of character display
curses.textpad: text input field of curses program
curses.ascii: ASCII character set tool
curses.panel: Curses control stack extension
platform: access to the underlying platform authentication data
errno: standard error notation
ctypes: Python external function library
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: Alternative to threading module (when _thread is not available)
_ thread: the underlying thread API (threading is based on it)
_ dummy_thread: Alternative to _thread module (when _thread is not available)
socket: low-level network interface
ssl: TLS/SSL filler for socket objects
asyncore: asynchronous socket processor
asynchat: Asynchronous socket command/response processor
signal: Asynchronous transaction signal processor
mmap: memory mapped file support
email: Mail and MIME processing package
json: JSON encoding and decoding
mailcap: mailcap file processing
mailbox: multiple formats to control mailboxes
mimetypes: file name and MIME type mapping
base64: RFC3548: Base16, Base32, Base64 encoding
binhex: binhex4 file encoding and decoding
binascii: Conversion between binary code and ASCII code
quopri: MIMEquoted-encoding and decoding of printable data
uu: encoding and decoding of uuencode files
webbrowser: Simple web browser controller
cgi: CGI support
cgitb: CGI script reverse tracking manager
wsgiref: WSGI tool and reference implementation
urllib: URL processing module
urllib.request: Open the extension library for URL connection
urllib.response: the response class of the urllib module
urllib.parse: parse URL 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: UUID object of RFC4122
socketserver: web server framework
http.server: HTTP server
http.cookies: HTTPCookie state manager
http.cookiejar: Cookie processing of HTTP client
xmlrpc: XML-RPC server and client module
xmlrpc.client: XML-RPC client access
xmlrpc.server: XML-RPC server foundation
ipaddress: IPv4/IPv6 control library
audioop: Process 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: Specify the image type
sndhdr: Specify the sound file type
ossaudiodev: Access to OSS compatible audio devices
gettext: multilingual international service
locale: Internationalization service
turtle: Turtle graphics library
cmd: line-based command interpreter support
shlex: simple dictionary analysis
tkinter: Tcl/Tk interface
tkinter.ttk: Tk theme control
tkinter.tix: Tk extension control
tkinter.scrolledtext: scroll text control
pydoc: Documentation generator and online help system
doctest: Interactive Python example
unittest: unit testing framework
unittest.mock: mock object library
test: Python regression test package
test.support: Python test tool suite
venv: virtual environment construction
bdb: debugging framework
faulthandler: Python reverse tracking library
pdb: Python debugger
timeit: measure the execution time of a small piece of code
trace: Python execution status tracking
sys: system-related parameters and functions
sysconfig: Access Python configuration information
builtins: built-in objects
main: top-level script environment
warnings: warning control
contextlib: context tool for with state
abc: virtual base class
atexit: export processor
traceback: print or read a stack traceback
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
code: base class interpreter
codeop: Compile Python code
imp: access the inside of the import module
zipimport: Import modules from ZIP archive
pkgutil: package expansion tool
modulefinder: Find modules through scripts
runpy: locate and execute Python modules
importlib: an implementation of import
parser: access the Python parse tree
ast: abstract syntax tree
symtable: access to the compiler symbol table
symbol: Constants in the Python parse tree
token: Constant in the Python parse tree
keyword: Python keyword test
tokenize: Python source file tokenization
tabnany: fuzzy indentation detection
pyclbr: Python class browsing support
py_compile: Compile Python source files
compileall: Compile Python libraries by byte
dis: Disassembler for Python bytecode
pickletools: serialization development tools
formatter: general formatted output
msilib: Read and write Windows Installer files
msvcrt: a useful program for MS VC + + Runtime
winreg: Windows registry access
winsound: Windows sound playback interface
posix: The most commonly used POSIX call
pwd: password database
spwd: shadow password database
grp: group database
crypt: Unix password verification
termios: POSIX style tty control
tty: terminal control function
pty: pseudo terminal tool
fcntl: system calls fcntl() and ioctl()
pipes: shell pipe interface
resource: resource availability information
nis: Sun's NIS interface
syslog: Unix log service
The above is a brief summary of the various built-in modules of Python. You can bookmark this article and retrieve it later when you are working on a project. I hope this article can help you, and welcome to add some commonly used Python built-in modules.
Recommended Posts