Introduction to IDAPython is an article written for the Reverse Engineering site OpenRCE. From its abstract:

"IDAPython is an extension for IDA, the Interactive Disassembler. It brings the power and convenience of Python scripting to aid in the analysis of binaries. This article will cover some basic usage and provide examples to get interested individuals started. We will walk through practical examples ranging from iterating through functions, segments and instructions to data mining the binaries, collecting references and analyzing their structure."

The PDF version of the paper can be downloaded from this location.