Standard Libraries

Built-in libraries available for import without any registration.

Library Description
base64 Base64 encoding and decoding
collections Specialized container datatypes
contextlib Utilities for the with statement (suppress)
datetime Date and time formatting
difflib Sequence comparison and diff generation
functools Higher-order functions and decorators
hashlib Secure hash algorithms
html HTML escaping and unescaping
io In-memory I/O streams (StringIO)
itertools Iterator functions
json Parse and generate JSON data
math Mathematical functions and constants
platform Platform identifying data
random Random number generation
re Regular expression operations
statistics Statistical functions
string String constants
textwrap Text wrapping and filling
time Time access and conversions
urllib URL handling
uuid UUID generation

Usage

import json
import math

data = json.loads('{"a": 1, "b": 2}')
result = math.sqrt(data["a"] + data["b"])