bitstring is a Python module that helps to make the creation and analysis of binary data as simple and natural as possible. Objects can be constructed from integers (big and little endian), floats, hex, octal, binary, byte data, iterables, or files. They can be sliced, joined, reversed, packed, unpacked, inserted into, overwritten, and otherwise operated upon with simple functions or slice notation. They can also be parsed, searched, and navigated in, similar to a file or stream. Internally the data is efficiently stored as byte arrays. It is available for Python 2.6 and later (including Python 3).
JagPDF is a library for generating PDF documents in C/C++, Python, and Java. It supports TrueType (subsetting) and standard 14 Type 1 fonts, font metrics, Unicode, UTF-8 and common 8-bit character encodings, images (JPEG, PNG, or custom), paths, color spaces (RGB, CMYK, CIE based, ICC profiles, indexed), encryption, bookmarks, hyperlinks, and more.
arrayfrombuffer allows a programmer to use Numerical Python arrays whose contents are stored in buffer objects, including memory-mapped files. Loading an array from a file is easy, requiring only a module import and a single function call. Loading the array is quick because it doesn't require any copying from one part of memory to another. Arrays created with arrayfrombuffer are also highly memory-efficient, since only the array data that you are currently using gets loaded into memory. When an array is modified, only the modified parts get written back out to disk. These arrays can also be bigger than physical memory.