bitstring is a pure Python module that makes the creation, manipulation and analysis of binary data as simple and natural as possible.