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).