Data Persistence and Exchange
Serializing Objects
Storing Serialized Objects
Relational Databases
Data Exchange Through Standard Formats
In-Memory Data Structures
array
Sorting
Queue
collections
Decoding Data
Custom Variations
File Access
Filenames
Meta-data
Reading Files
Temporary Files
Files and Directories
Text Processing Tools
string module
Text Input
Text Output
Comparing Values
Built-in Objects
exceptions – Built-in error classes
String Services
codecs – String encoding and decoding
difflib – Compare sequences
string – Working with text
StringIO and cStringIO – Work with text buffers using file-like API
re – Regular Expressions
struct – Working with Binary Data
textwrap – Formatting text paragraphs
Data Types
array – Sequence of fixed-type data
datetime – Date/time value manipulation
calendar – Work with dates
collections – Container data types
heapq – In-place heap sort algorithm
bisect – Maintain lists in sorted order
sched – Generic event scheduler.
Queue – A thread-safe FIFO implementation
weakref – Garbage-collectable references to objects
copy – Duplicate objects
pprint – Pretty-print data structures
Numeric and Mathematical Modules
decimal – Fixed and floating point math
fractions – Rational Numbers
functools – Tools for Manipulating Functions
itertools – Iterator functions for efficient looping
math – Mathematical functions
operator – Functional interface to built-in operators
random – Pseudorandom number generators
Internet Data Handling
base64 – Encode binary data into ASCII characters
json – JavaScript Object Notation Serializer
mailbox – Access and manipulate email archives
mhlib – Work with MH mailboxes
File Formats
csv – Comma-separated value files
ConfigParser – Work with configuration files
robotparser – Internet spider access control
Cryptographic Services
hashlib – Cryptographic hashes and message digests
hmac – Cryptographic signature and verification of messages.
File and Directory Access
os.path – Platform-independent manipulation of file names.
fileinput – Process lines from input streams
filecmp – Compare files
tempfile – Create temporary filesystem resources.
glob – Filename pattern matching
fnmatch – Compare filenames against Unix-style glob patterns.
linecache – Read text files efficiently
shutil – High-level file operations.
dircache – Cache directory listings
Data Compression and Archiving
bz2 – bzip2 compression
gzip – Read and write GNU zip files
tarfile – Tar archive access
zipfile – Read and write ZIP archive files
zlib – Low-level access to GNU zlib compression library
Data Persistence
anydbm – Access to DBM-style databases
dbhash – DBM-style API for the BSD database library
dbm – Simple database interface
dumbdbm – Portable DBM Implementation
gdbm – GNU's version of the dbm library
pickle and cPickle – Python object serialization
shelve – Persistent storage of arbitrary Python objects
whichdb – Identify DBM-style database formats
sqlite3 – Embedded Relational Database
Generic Operating System Services
os – Portable access to operating system specific features.
time – Functions for manipulating clock time
getopt – Command line option parsing
optparse – Command line option parser to replace getopt.
argparse – Command line option and argument parsing.
logging – Report status, error, and informational messages.
getpass – Prompt the user for a password without echoing.
platform – Access system version information
Optional Operating System Services
threading – Manage concurrent threads
mmap – Memory-map files
multiprocessing – Manage processes like threads
readline – Interface to the GNU readline library
rlcompleter – Adds tab-completion to the interactive interpreter
Unix-specific Services
commands – Run external shell commands
grp – Unix Group Database
pipes – Unix shell command pipeline templates
pwd – Unix Password Database
resource – System resource management
Interprocess Communication and Networking
asynchat – Asynchronous protocol handler
asyncore – Asynchronous I/O handler
signal – Receive notification of asynchronous system events
subprocess – Work with additional processes
Internet Protocols and Support
BaseHTTPServer – base classes for implementing web servers
cgitb – Detailed traceback reports
Cookie – HTTP Cookies
imaplib - IMAP4 client library
SimpleXMLRPCServer – Implements an XML-RPC server.
smtpd – Sample SMTP Servers
smtplib – Simple Mail Transfer Protocol client
socket – Network Communication
select – Wait for I/O Efficiently
SocketServer – Creating network servers.
urllib – simple interface for network resource access
urllib2 – Library for opening URLs.
urlparse – Split URL into component pieces.
uuid – Universally unique identifiers
webbrowser – Displays web pages
xmlrpclib – Client-side library for XML-RPC communication
Structured Markup Processing Tools
xml.etree.ElementTree – XML Manipulation API
Internationalization
gettext – Message Catalogs
locale – POSIX cultural localization API
Program Frameworks
cmd – Create line-oriented command processors
shlex – Lexical analysis of shell-style syntaxes.
Development Tools
doctest – Testing through documentation
pydoc – Online help for Python modules
unittest – Automated testing framework
pdb – Interactive Debugger
Debugging and Profiling
profile, cProfile, and pstats – Performance analysis of Python programs.
timeit – Time the execution of small bits of Python code.
trace – Follow Python statements as they are executed
Python Runtime Services
abc – Abstract Base Classes
atexit – Call functions when a program is closing down
contextlib – Context manager utilities
gc – Garbage Collector
inspect – Inspect live objects
site – Site-wide configuration
sys – System-specific Configuration
sysconfig – Interpreter Compile-time Configuration
traceback – Extract, format, and print exceptions and stack traces.
warnings – Non-fatal alerts
Importing Modules
imp – Interface to module import mechanism.
pkgutil – Package Utilities
zipimport – Load Python code from inside ZIP archives
Miscelaneous
EasyDialogs – Carbon dialogs for Mac OS X
plistlib – Manipulate OS X property list files
History
Python Module Index
Index