Python Modules

Last Updated on November 18, 2025 by Admin

IndexModulesDescription
1__future__Future statement definitions
2__main__The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and “__name__ == ‘__main__’“.
3_threadLow-level threading API.
4_tkinterA binary module that contains the low-level interface to Tcl/Tk.
5abcAbstract base classes according to :pep:`3119`.
6aifcDeprecated: Removed in 3.13.
7annotationlibFunctionality for introspecting annotations
8argparseCommand-line option and argument parsing library.
9arraySpace efficient arrays of uniformly typed numeric values.
10astAbstract Syntax Tree classes and manipulation.
11asynchatDeprecated: Removed in 3.12.
12asyncioAsynchronous I/O.
13asyncoreDeprecated: Removed in 3.12.
14atexitRegister and execute cleanup functions.
15audioopDeprecated: Removed in 3.13.
16base64RFC 4648: Base16, Base32, Base64 Data Encodings; Base85 and Ascii85
17bdbDebugger framework.
18binasciiTools for converting between binary and various ASCII-encoded binary representations.
19bisectArray bisection algorithms for binary searching.
20builtinsThe module that provides the built-in namespace.
21bz2Interfaces for bzip2 compression and decompression.
22calendarFunctions for working with calendars, including some emulation of the Unix cal program.
23cgiDeprecated: Removed in 3.13.
24cgitbDeprecated: Removed in 3.13.
25chunkDeprecated: Removed in 3.13.
26cmathMathematical functions for complex numbers.
27cmdBuild line-oriented command interpreters.
28codeFacilities to implement read-eval-print loops.
29codecsEncode and decode data and streams.
30codeopCompile (possibly incomplete) Python code.
31collectionsContainer datatypes
32colorsysConversion functions between RGB and other color systems.
33compileallTools for byte-compiling all Python source files in a directory tree.
34compression
35concurrent
36configparserConfiguration file parser.
37contextlibUtilities for with-statement contexts.
38contextvarsContext Variables
39copyShallow and deep copy operations.
40copyregRegister pickle support functions.
41cProfile
42cryptDeprecated: Removed in 3.13.
43csvWrite and read tabular data to and from delimited files.
44ctypesA foreign function library for Python.
45curses (Unix)An interface to the curses library, providing portable terminal handling.
46dataclassesGenerate special methods on user-defined classes.
47datetimeBasic date and time types.
48dbmInterfaces to various Unix “database” formats.
49decimalImplementation of the General Decimal Arithmetic Specification.
50difflibHelpers for computing differences between objects.
51disDisassembler for Python bytecode.
52distutilsDeprecated: Removed in 3.12.
53doctestTest pieces of code within docstrings.
54emailPackage supporting the parsing, manipulating, and generating email messages.
55encodingsEncodings package
56ensurepipBootstrapping the “pip” installer into an existing Python installation or virtual environment.
57enumImplementation of an enumeration class.
58errnoStandard errno system symbols.
59faulthandlerDump the Python traceback.
60fcntl (Unix)The fcntl() and ioctl() system calls.
61filecmpCompare files efficiently.
62fileinputLoop over standard input or a list of files.
63fnmatchUnix shell style filename pattern matching.
64fractionsRational numbers.
65ftplibFTP protocol client (requires sockets).
66functoolsHigher-order functions and operations on callable objects.
67gcInterface to the cycle-detecting garbage collector.
68getoptPortable parser for command line options; support both short and long option names.
69getpassPortable reading of passwords and retrieval of the userid.
70gettextMultilingual internationalization services.
71globUnix shell style pathname pattern expansion.
72graphlibFunctionality to operate with graph-like structures
73grp (Unix)The group database (getgrnam() and friends).
74gzipInterfaces for gzip compression and decompression using file objects.
75hashlibSecure hash and message digest algorithms.
76heapqHeap queue algorithm (a.k.a. priority queue).
77hmacKeyed-Hashing for Message Authentication (HMAC) implementation
78htmlHelpers for manipulating HTML.
79httpHTTP status codes and messages
80idlelibImplementation package for the IDLE shell/editor.
81imaplibIMAP4 protocol client (requires sockets).
82imghdrDeprecated: Removed in 3.13.
83impDeprecated: Removed in 3.12.
84importlibThe implementation of the import machinery.
85inspectExtract information and source code from live objects.
86ioCore tools for working with streams.
87ipaddressIPv4/IPv6 manipulation library.
88itertoolsFunctions creating iterators for efficient looping.
89jsonEncode and decode the JSON format.
90keywordTest whether a string is a keyword in Python.
91linecacheProvides random access to individual lines from text files.
92localeInternationalization services.
93loggingFlexible event logging system for applications.
94lzmaA Python wrapper for the liblzma compression library.
95mailboxManipulate mailboxes in various formats
96mailcapDeprecated: Removed in 3.13.
97marshalConvert Python objects to streams of bytes and back (with different constraints).
98mathMathematical functions (sin() etc.).
99mimetypesMapping of filename extensions to MIME types.
100mmapInterface to memory-mapped files for Unix and Windows.
101modulefinderFind modules used by a script.
102msilibDeprecated: Removed in 3.13.
103msvcrt (Windows)Miscellaneous useful routines from the MS VC++ runtime.
104multiprocessingProcess-based parallelism.
105netrcLoading of .netrc files.
106nisDeprecated: Removed in 3.13.
107nntplibDeprecated: Removed in 3.13.
108numbersNumeric abstract base classes (Complex, Real, Integral, etc.).
109operatorFunctions corresponding to the standard operators.
110optparseCommand-line option parsing library.
111osMiscellaneous operating system interfaces.
112ossaudiodevDeprecated: Removed in 3.13.
113pathlibObject-oriented filesystem paths
114pdbThe Python debugger for interactive interpreters.
115pickleConvert Python objects to streams of bytes and back.
116pickletoolsContains extensive comments about the pickle protocols and pickle-machine opcodes, as well as some useful functions.
117pipesDeprecated: Removed in 3.13.
118pkgutilUtilities for the import system.
119platformRetrieves as much platform identifying data as possible.
120plistlibGenerate and parse Apple plist files.
121poplibPOP3 protocol client (requires sockets).
122posix (Unix)The most common POSIX system calls (normally used via module os).
123pprintData pretty printer.
124profilePython source profiler.
125pstatsStatistics object for use with the profiler.
126pty (Unix)Pseudo-Terminal Handling for Unix.
127pwd (Unix)The password database (getpwnam() and friends).
128py_compileGenerate byte-code files from Python source files.
129pyclbrSupports information extraction for a Python module browser.
130pydocDocumentation generator and online help system.
131queueA synchronized queue class.
132quopriEncode and decode files using the MIME quoted-printable encoding.
133randomGenerate pseudo-random numbers with various common distributions.
134reRegular expression operations.
135readline (Unix)GNU readline support for Python.
136reprlibAlternate repr() implementation with size limits.
137resource (Unix)An interface to provide resource usage information on the current process.
138rlcompleterPython identifier completion, suitable for the GNU readline library.
139runpyLocate and run Python modules without importing them first.
140schedGeneral purpose event scheduler.
141secretsGenerate secure random numbers for managing secrets.
142selectWait for I/O completion on multiple streams.
143selectorsHigh-level I/O multiplexing.
144shelvePython object persistence.
145shlexSimple lexical analysis for Unix shell-like languages.
146shutilHigh-level file operations, including copying.
147signalSet handlers for asynchronous events.
148siteModule responsible for site-specific configuration.
149sitecustomize
150smtpdDeprecated: Removed in 3.12.
151smtplibSMTP protocol client (requires sockets).
152sndhdrDeprecated: Removed in 3.13.
153socketLow-level networking interface.
154socketserverA framework for network servers.
155spwdDeprecated: Removed in 3.13.
156sqlite3A DB-API 2.0 implementation using SQLite 3.x.
157sslTLS/SSL wrapper for socket objects
158statUtilities for interpreting the results of os.stat(), os.lstat() and os.fstat().
159statisticsMathematical statistics functions
160stringCommon string operations.
161stringprepString preparation, as per RFC 3453
162structInterpret bytes as packed binary data.
163subprocessSubprocess management.
164sunauDeprecated: Removed in 3.13.
165symtableInterface to the compiler’s internal symbol tables.
166sysAccess system-specific parameters and functions.
167sysconfigPython’s configuration information
168syslog (Unix)An interface to the Unix syslog library routines.
169tabnannyTool for detecting white space related problems in Python source files in a directory tree.
170tarfileRead and write tar-format archive files.
171telnetlibDeprecated: Removed in 3.13.
172tempfileGenerate temporary files and directories.
173termios (Unix)POSIX style tty control.
174testRegression tests package containing the testing suite for Python.
175textwrapText wrapping and filling
176threadingThread-based parallelism.
177timeTime access and conversions.
178timeitMeasure the execution time of small code snippets.
179tkinterInterface to Tcl/Tk for graphical user interfaces
180tokenConstants representing terminal nodes of the parse tree.
181tokenizeLexical scanner for Python source code.
182tomllibParse TOML files.
183traceTrace or track Python statement execution.
184tracebackPrint or retrieve a stack traceback.
185tracemallocTrace memory allocations.
186tty (Unix)Utility functions that perform common terminal control operations.
187turtleAn educational framework for simple graphics applications
188turtledemoA viewer for example turtle scripts
189typesNames for built-in types.
190typingSupport for type hints (see :pep:`484`).
191unicodedataAccess the Unicode Database.
192unittestUnit testing framework for Python.
193urllib
194urllib.errorException classes raised by urllib.request.
195urllib.parseParse URLs into or assemble them from components.
196urllib.requestExtensible library for opening URLs.
197urllib.responseResponse classes used by urllib.
198urllib.robotparserLoad a robots.txt file and answer questions about fetchability of other URLs.
199usercustomize
200uuDeprecated: Removed in 3.13.
201uuidUUID objects (universally unique identifiers) according to RFC 9562
202venvCreation of virtual environments.
203warningsIssue warning messages and control their disposition.
204waveProvide an interface to the WAV sound format.
205weakrefSupport for weak references and weak dictionaries.
206webbrowserEasy-to-use controller for web browsers.
207winreg (Windows)Routines and objects for manipulating the Windows registry.
208winsound (Windows)Access to the sound-playing machinery for Windows.
209wsgirefWSGI Utilities and Reference Implementation.
210xdrlibDeprecated: Removed in 3.13.
211xmlPackage containing XML processing modules
212xmlrpcServer and client modules implementing XML-RPC.
213zipappManage executable Python zip archives
214zipfileRead and write ZIP-format archive files.
215zipimportSupport for importing Python modules from ZIP archives.
216zlibLow-level interface to compression and decompression routines compatible with gzip.
217zoneinfoIANA time zone support