On this page
- stdlib_module
- Exploring the Standard Library
- Standard Library by Topic
- Text Processing
- Binary Data & Codecs
- Data Types & Collections
- Numeric & Mathematical
- Functional Programming & Iterators
- File & Directory Access
- Data Persistence & Archiving
- File Formats & Config
- Cryptography & Hashing
- OS, Processes & Concurrency
- Internet, Protocols & Markup
- Multimedia & GUI
- Development, Typing & Debugging
- Runtime, Packaging & Language Services
- Alphabetical Index (All 194 Public Modules)
stdlib_module
Prev: __builtins__ | Up: python3 | Next: python3
Rel: python3, __builtins__
Ref: docs.python.org — The Python Standard Library
Tags: #public #python3 #stdlib #index
Exploring the Standard Library
import sys
public_modules = sorted(m for m in sys.stdlib_module_names if not m.startswith('_'))
print(public_modules)
Standard Library by Topic
Text Processing
difflib, re, readline, rlcompleter, string, stringprep, textwrap, unicodedata
Binary Data & Codecs
Data Types & Collections
array, bisect, calendar, collections, copy, datetime, enum, graphlib, heapq, pprint, reprlib, types, weakref, zoneinfo
Numeric & Mathematical
cmath, decimal, fractions, math, numbers, random, statistics
Functional Programming & Iterators
functools, itertools, operator
File & Directory Access
filecmp, fileinput, fnmatch, genericpath, glob, io, linecache, ntpath, os, pathlib, posixpath, shutil, stat, tempfile, time
Data Persistence & Archiving
bz2, compression, copyreg, dbm, gzip, lzma, marshal, pickle, shelve, sqlite3, tarfile, zipfile, zlib
File Formats & Config
configparser, csv, netrc, plistlib, tomllib
Cryptography & Hashing
OS, Processes & Concurrency
argparse, asyncio, concurrent, contextvars, ctypes, curses, errno, fcntl, getopt, getpass, grp, io, logging, mmap, msvcrt, multiprocessing, nt, optparse, os, platform, posix, pty, pwd, queue, resource, sched, select, selectors, signal, socket, ssl, subprocess, syslog, termios, threading, time, tty, winreg, winsound
Internet, Protocols & Markup
base64, binascii, email, ftplib, html, http, imaplib, ipaddress, json, mailbox, mimetypes, nturl2path, poplib, quopri, smtplib, socketserver, urllib, uuid, webbrowser, wsgiref, xml, xmlrpc
Multimedia & GUI
cmd, colorsys, gettext, idlelib, locale, shlex, tkinter, turtle, turtledemo, wave
Development, Typing & Debugging
annotationlib, bdb, cProfile, doctest, faulthandler, pdb, profile, pstats, pydoc, pydoc_data, timeit, trace, tracemalloc, typing, unittest
Runtime, Packaging & Language Services
abc, antigravity, ast, atexit, builtins, code, codeop, compileall, contextlib, dataclasses, dis, ensurepip, gc, importlib, inspect, keyword, modulefinder, opcode, pickletools, pkgutil, py_compile, pyclbr, pyexpat, runpy, site, sre_compile, sre_constants, sre_parse, symtable, sys, sysconfig, tabnanny, this, token, tokenize, traceback, venv, warnings, zipapp, zipimport
Alphabetical Index (All 194 Public Modules)
- abc — Abstract Base Classes (ABCs) according to PEP 3119. (docs )
- annotationlib — Helpers for introspecting and wrapping annotations. (docs )
- antigravity — Easter egg module that opens the classic xkcd #353 Python comic in a web browser. (docs )
- argparse — Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments (docs )
- array — This module defines an object type which can efficiently represent an array of basic values: characters, integers, floating-point numbers. Arrays are sequence types and behave very much like lists, (docs )
- ast — The
astmodule helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what (docs ) - asyncio — The asyncio package, tracking PEP 3156. (docs )
- atexit — allow programmer to define multiple exit functions to be executed upon normal program termination. (docs )
- base64 — Base16, Base32, Base64 (RFC 4648), Base85 and Ascii85 data encodings (docs )
- bdb — Debugger basics (docs )
- binascii — Conversion between binary data and ASCII (docs )
- bisect — Bisection algorithms. (docs )
- builtins — Built-in functions, types, exceptions, and other objects. (docs )
- bz2 — Interface to the libbzip2 compression library. (docs )
- cProfile — Python interface for the 'lsprof' profiler. (docs )
- calendar — Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and (docs )
- cmath — This module provides access to mathematical functions for complex numbers. (docs )
- cmd — A generic class to build line-oriented command interpreters. (docs )
- code — Utilities needed to emulate Python's interactive interpreter. (docs )
- codecs — codecs -- Python Codec Registry, API and helpers. (docs )
- codeop — Utilities to compile possibly incomplete Python source code. (docs )
- collections — This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. (docs )
- colorsys — Conversion functions between RGB and other color systems. (docs )
- compileall — Module/script to byte-compile all .py files to .pyc files. (docs )
- compression — Python standard library
compressionmodule. (docs ) - concurrent — Python standard library
concurrentmodule. (docs ) - configparser — Configuration file parser. (docs )
- contextlib — Utilities for with-statement contexts. See PEP 343. (docs )
- contextvars — Python standard library
contextvarsmodule. (docs ) - copy — Interface summary: import copy x = copy.copy(y) # make a shallow copy of y (docs )
- copyreg — Helper to provide extensibility for pickle. (docs )
- csv — CSV parsing and writing. (docs )
- ctypes — create and manipulate C data types in Python (docs )
- curses — curses The main package for curses support for Python. Normally used by importing the package, and perhaps a particular module inside it. (docs )
- dataclasses — Python standard library
dataclassesmodule. (docs ) - datetime — Specific date/time and related types. (docs )
- dbm — Generic interface to all dbm clones. (docs )
- decimal — Decimal fixed-point and floating-point arithmetic. (docs )
- difflib — Module difflib -- helpers for computing deltas between objects. (docs )
- dis — Disassembler of Python byte code into mnemonics. (docs )
- doctest — Module doctest -- a framework for running examples in docstrings. (docs )
- email — A package for parsing, handling, and generating email messages. (docs )
- encodings — Standard "encodings" Package Standard Python encoding modules are stored in this package directory. (docs )
- ensurepip — Python standard library
ensurepipmodule. (docs ) - enum — Python standard library
enummodule. (docs ) - errno — This module makes available standard errno system symbols. (docs )
- faulthandler — faulthandler module. (docs )
- fcntl — This module performs file control and I/O control on file descriptors. It is an interface to the fcntl() and ioctl() Unix routines. File descriptors can be obtained with the fileno() method of (docs )
- filecmp — Utilities for comparing files and directories. (docs )
- fileinput — Helper class to quickly write a loop over all standard input files. (docs )
- fnmatch — Filename matching with shell patterns. (docs )
- fractions — Fraction, infinite-precision, rational numbers. (docs )
- ftplib — An FTP client class and some helper functions. (docs )
- functools — functools.py - Tools for working with functions and callable objects (docs )
- gc — This module provides access to the garbage collector for reference cycles. (docs )
- genericpath — Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. (docs )
- getopt — Parser for command line options. (docs )
- getpass — Utilities to get a password and/or the current user name. (docs )
- gettext — Internationalization and localization support. (docs )
- glob — Filename globbing utility. (docs )
- graphlib — Python standard library
graphlibmodule. (docs ) - grp — Access to the Unix group database. (docs )
- gzip — Functions that read and write gzipped files. (docs )
- hashlib — hashlib module - A common interface to many hash functions. (docs )
- heapq — Heap queue algorithm (a.k.a. priority queue). (docs )
- hmac — Implements the HMAC algorithm as described by RFC 2104. (docs )
- html — General functions for HTML manipulation. (docs )
- http — Python standard library
httpmodule. (docs ) - idlelib — Implementation library for the IDLE integrated development and learning environment. (docs )
- imaplib — IMAP4 client. (docs )
- importlib — A pure Python implementation of import. (docs )
- inspect — Get useful information from live Python objects. (docs )
- io — The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. (docs )
- ipaddress — A fast, lightweight IPv4/IPv6 manipulation library in Python. (docs )
- itertools — Functional tools for creating and using iterators. (docs )
- json — JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. (docs )
- keyword — This file is automatically generated; please don't muck it up! To update the symbols in this file, 'cd' to the top directory of the python source tree and run: (docs )
- linecache — Cache lines from Python source files. (docs )
- locale — Locale support module. (docs )
- logging — Logging package for Python. Based on PEP 282 and comments thereto in comp.lang.python. (docs )
- lzma — Interface to the liblzma compression library. (docs )
- mailbox — Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes. (docs )
- marshal — This module contains functions that can read and write Python values in a binary format. The format is specific to Python, but independent of machine architecture issues. (docs )
- math — This module provides access to the mathematical functions defined by the C standard. (docs )
- mimetypes — Guess the MIME type of a file. (docs )
- mmap — Python standard library
mmapmodule. (docs ) - modulefinder — Find modules used by a script, using introspection. (docs )
- msvcrt — Useful routines from the MS VC++ runtime (Windows-only console I/O and file locking). (docs )
- multiprocessing — Python standard library
multiprocessingmodule. (docs ) - netrc — An object-oriented interface to .netrc files. (docs )
- nt — Underlying Windows operating system implementation module backing
oson Windows. (docs ) - ntpath — Common pathname manipulations, WindowsNT/95 version. (docs )
- nturl2path — Convert a NT pathname to a file URL and vice versa. (docs )
- numbers — Abstract Base Classes (ABCs) for numbers, according to PEP 3141. (docs )
- opcode — opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). (docs )
- operator — Operator interface. (docs )
- optparse — A powerful, extensible, and easy-to-use option parser. (docs )
- os — OS routines for NT or Posix depending on what system we're on. (docs )
- pathlib — Object-oriented filesystem paths. (docs )
- pdb — The Python Debugger Pdb ======================= To use the debugger in its simplest form: (docs )
- pickle — Create portable serialized representations of Python objects. (docs )
- pickletools — "Executable documentation" for the pickle module. (docs )
- pkgutil — Utilities to support packages. (docs )
- platform — This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. (docs )
- plistlib — plistlib.py -- a tool to generate and parse MacOSX .plist files. (docs )
- poplib — A POP3 client class. (docs )
- posix — This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and (docs )
- posixpath — Common operations on Posix pathnames. (docs )
- pprint — Support to pretty-print lists, tuples, & dictionaries recursively. (docs )
- profile — Class for profiling Python code. (docs )
- pstats — Class for printing reports on profiled python code. (docs )
- pty — Pseudo terminal utilities. (docs )
- pwd — This module provides access to the Unix password database. (docs )
- py_compile — Routine to "compile" a .py file to a .pyc file. (docs )
- pyclbr — Parse a Python module and describe its classes and functions. (docs )
- pydoc — Generate Python documentation in HTML or text for interactive use. (docs )
- pydoc_data — Python standard library
pydoc_datamodule. (docs ) - pyexpat — Python wrapper for Expat parser. (docs )
- queue — A multi-producer, multi-consumer queue. (docs )
- quopri — Conversions to/from quoted-printable transport encoding as per RFC 1521. (docs )
- random — Random variable generators. (docs )
- re — Support for regular expressions (RE). (docs )
- readline — Importing this module enables command line editing using libedit readline. (docs )
- reprlib — Redo the builtin repr() (representation) but with limits on most sizes. (docs )
- resource — Python standard library
resourcemodule. (docs ) - rlcompleter — Word completion for GNU readline. (docs )
- runpy — runpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. (docs )
- sched — A generally useful event scheduler class. (docs )
- secrets — Generate cryptographically strong pseudo-random numbers suitable for managing secrets such as account authentication, tokens, and similar. (docs )
- select — This module supports asynchronous I/O on multiple file descriptors. (docs )
- selectors — Selectors module. (docs )
- shelve — Manage shelves of pickled objects. (docs )
- shlex — A lexical analyzer class for simple shell-like syntaxes. (docs )
- shutil — Utility functions for copying and archiving files and directory trees. (docs )
- signal — Python standard library
signalmodule. (docs ) - site — Append module search paths for third-party packages to sys.path. (docs )
- smtplib — SMTP/ESMTP client class. (docs )
- socket — This module provides socket operations and some related functions. (docs )
- socketserver — Generic socket server classes. (docs )
- sqlite3 — The sqlite3 extension module provides a DB-API 2.0 (PEP 249) compliant interface to the SQLite library, and requires SQLite 3.15.2 or newer. (docs )
- sre_compile — Python standard library
sre_compilemodule. (docs ) - sre_constants — Python standard library
sre_constantsmodule. (docs ) - sre_parse — Python standard library
sre_parsemodule. (docs ) - ssl — This module provides some more Pythonic support for SSL. (docs )
- stat — Constants/functions for interpreting results of os.stat() and os.lstat(). (docs )
- statistics — Basic statistics module. (docs )
- string — A collection of string constants. (docs )
- stringprep — Library that exposes various tables found in the StringPrep RFC 3454. (docs )
- struct — Functions to convert between Python values and C structs. (docs )
- subprocess — Subprocesses with accessible I/O streams This module allows you to spawn processes, connect to their input/output/error pipes, and obtain their return codes. (docs )
- symtable — Interface to the compiler's internal symbol tables (docs )
- sys — This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter. (docs )
- sysconfig — Access to Python's configuration information. (docs )
- syslog — Python standard library
syslogmodule. (docs ) - tabnanny — The Tab Nanny despises ambiguous indentation. She knows no mercy. (docs )
- tarfile — Read from and write to tar format archives. (docs )
- tempfile — Temporary files. (docs )
- termios — This module provides an interface to the Posix calls for tty I/O control. (docs )
- textwrap — Text wrapping and filling. (docs )
- this — The Zen of Python (PEP 20) by Tim Peters, printed upon
import this. (docs ) - threading — Thread module emulating a subset of Java's threading model. (docs )
- time — This module provides various functions to manipulate time values. (docs )
- timeit — Tool for measuring execution time of small code snippets. (docs )
- tkinter — Standard Python interface to the Tcl/Tk GUI toolkit. (docs )
- token — Token constants. (docs )
- tokenize — Tokenization help for Python programs. (docs )
- tomllib — Python standard library
tomllibmodule. (docs ) - trace — program/module to trace Python program or function execution Sample use, command line: trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs (docs )
- traceback — Extract, format and print information about Python stack traces. (docs )
- tracemalloc — Python standard library
tracemallocmodule. (docs ) - tty — Terminal utilities. (docs )
- turtle — Turtle graphics for popular object-oriented and procedural drawing. (docs )
- turtledemo — Collection of demonstration scripts for the
turtlegraphics module (python3 -m turtledemo). (docs ) - types — Define names for built-in types that aren't directly accessible as a builtin. (docs )
- typing — The typing module: Support for gradual typing as defined by PEP 484 and subsequent PEPs. (docs )
- unicodedata — This module provides access to the Unicode Character Database which defines character properties for all Unicode characters. The data in this database is based on the UnicodeData.txt file version (docs )
- unittest — Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework (used with permission). (docs )
- urllib — Python standard library
urllibmodule. (docs ) - uuid — UUID objects (universally unique identifiers) according to RFC 4122/9562. (docs )
- venv — Virtual environment (venv) package for Python. Based on PEP 405. (docs )
- warnings — Python standard library
warningsmodule. (docs ) - wave — Stuff to parse WAVE files. (docs )
- weakref — Weak reference support for Python. (docs )
- webbrowser — Interfaces for launching and remotely controlling web browsers. (docs )
- winreg — Windows registry access routines (Windows-only). (docs )
- winsound — Sound-playing interface for Windows (
Beep,PlaySound,MessageBeep). (docs ) - wsgiref — wsgiref -- a WSGI (PEP 3333) Reference Library Current Contents: * util -- Miscellaneous useful functions and wrappers (docs )
- xml — Core XML support for Python. (docs )
- xmlrpc — Python standard library
xmlrpcmodule. (docs ) - zipapp — Python standard library
zipappmodule. (docs ) - zipfile — Read and write ZIP files. (docs )
- zipimport — zipimport provides support for importing Python modules from Zip archives. (docs )
- zlib — The functions in this module allow compression and decompression using the zlib library, which is based on GNU zip. (docs )
- zoneinfo — Python standard library
zoneinfomodule. (docs )
Linked from
Related notes
- tuts/python3 Linked here; links to this page; shared tags: #index
- tuts/python3/__builtins__ Linked here; links to this page; shared tags: #index
- tuts/python3/__builtins__/__builtins__ links to this page; shared tags: #index
- tuts/python3/stdlib_module/abc Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/annotationlib Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/antigravity Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/argparse Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/array Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/ast Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/asyncio Linked here; shared tags: #stdlib