The easiest way to get started with pyelftools is by examining the examples it comes with (in the examples/ directory of the source distribution). Examples are heavily commented, and each begins with ...
pyelftools is a pure-Python library for parsing and analyzing ELF files and DWARF debugging information. See the User's guide for more details. As a user of pyelftools, one only needs Python 3 to run.