bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/Python/Files, Modules, and the Standard Library
Python•Files, Modules, and the Standard Library

Python Python Built-in Modules

Concept visual

Python Python Built-in Modules

Graph traversalgraph
ABCDE
current
queued
1
4

Start from A

Formula

This page lists the built - in modules that ship with the Python 3.13 Standard Library.
These modules are available without extra installation (some are platform - dependent).

A

Module

Description

Introduced abc

Tools for defining Abstract Base Classes (interfaces for Python classes). 2.6 aifc

Formula

Read and write AIFF/AIFF - C audio files.

1.5.2 argparse

Formula

Parse command line arguments and create user - friendly CLIs.

2.7 array Efficient arrays of basic numeric types (compact alternative to lists). 1.0 ast Work with Python code as an Abstract Syntax Tree (analyze or transform code). 2.6 asyncio

Formula

Write concurrent code using the async/await syntax (event loop, tasks, IO).

3.4 atexit Register functions to run automatically when the program exits. 2.0 B

Module

Description

Introduced base64

Encode and decode data using Base16, Base32, Base64, etc. 2.0 bdb Debugger framework used by pdb (implements the core debugging logic).

binascii Convert between binary and ASCII (hex, base64 helpers at C speed). 2.0 bisect

Maintain sorted lists; insert and search with binary search.

2.0 builtins

Formula

Access Python's built - in objects like len, range, and exceptions.

3.0 bz2

Formula

Read and write bzip2 - compressed files and streams.

2.3 C

Module

Description

Introduced calendar

Work with dates as calendars; print text calendars and compute month info.

2.0 cgi Helpers for Common Gateway Interface (legacy web server scripts). 2.0 cgitb Pretty tracebacks for CGI scripts (HTML formatted error reports).

cmd

Formula

Build simple line - oriented command interpreters (REPL - like shells).

2.0 code Run an interactive interpreter or embed one in your program. 2.0 codecs

Formula

Text encodings and decoding/encoding helpers.

2.0 codeop Compile Python code objects conditionally (used by code editors and shells). 2.0 collections

Formula

High - performance container datatypes like deque, Counter, namedtuple.

2.4 colorsys Convert between color systems: RGB, YIQ, HLS, HSV. 2.0 concurrent Concurrency framework (futures) for running callables asynchronously. 3.2 configparser

Formula

Read and write INI - style configuration files.

3.0 contextlib

Formula

Utilities for context managers and the with - statement.

2.5 contextvars

Formula

Context - local storage for async code (like thread - local, but for tasks).

3.7 copy Shallow and deep copy operations for Python objects. 2.0 copyreg Register custom pickling functions for complex objects. 3.0 csv

Formula

Read and write CSV files (comma - separated values) with ease.

2.3 ctypes

Formula

Call C libraries and work with C - compatible data types.

2.5 curses

Formula

Terminal handling for character - cell UIs (Unix - like systems only).

2.0 D

Module

Description

Introduced dataclasses

Formula

Decorator and helpers for classes that store data (auto - generate init, repr, etc.).

3.7 datetime Dates, times, time zones, and timedeltas made simple and precise. 2.3 dbm

Formula

Family of simple on - disk key/value databases (backed by platform libs).

2.0 decimal

Formula

Fixed - point and floating decimal arithmetic for money and exact math.

2.4 difflib

Formula

Compare sequences and create human - readable diffs.

2.1 dis Disassemble Python bytecode for inspection and debugging. 2.0 doctest Test examples embedded in docstrings (keeps docs and code in sync). 2.1 E

Module

Description

Introduced email

Parse, build, and send email messages (headers, MIME, attachments). 2.2 encodings Implementation of text encodings used by Python's codec system. 2.0 ensurepip Bootstraps pip into a Python installation. 3.4 enum Define enumerations (named constants) with nice semantics. 3.4 errno Standard error number constants from the OS. 2.0 F

Module

Description

Introduced faulthandler

Dump Python tracebacks on a crash or on demand (helps debug hard faults). 3.3 filecmp Compare files and directories to see what changed. 2.0 fileinput Loop over lines from stdin or a list of files as a single stream. 2.0 fnmatch

Formula

Match filenames using shell - style wildcards.

2.0 fractions Rational numbers (Fractions) for exact arithmetic. 2.6 ftplib FTP client library for transferring files. 2.0 functools

Formula

Higher - order functions and utilities (lru_cache, partial, wraps, etc.).

2.5 G

Module

Description

Introduced gc

Control the garbage collector and inspect tracked objects. 2.0 getopt

Formula

Parse command - line options (POSIX - style).

1.5.2 getpass Prompt for a password without echoing it to the console. 2.0 gettext Internationalization (i18n) support for translating messages. 2.3 glob Find pathnames matching a pattern like *.py. 2.0 graphlib Topological sorting utilities for dependency graphs. 3.9 gzip

Formula

Read and write gzip - compressed files and streams.

2.0 H

Module

Description

Previous

Python File Open

Next

How to Remove Duplicates From a Python List