Skip to main content

Simple construction, analysis and modification of binary data.

Project description

bitstring is a pure Python module designed to help make the creation and analysis of binary data as painless as possible.

BitString objects can be constructed from integers, hexadecimal, octal, binary, strings or files. They can be sliced, joined, reversed, inserted into, overwritten, etc. with simple functions or slice notation. They can also be read from, searched, and navigated in, similar to a file or stream.


To install run the script with the ‘install’ argument:

python install

This should put in your site-packages directory. You may need to run this with root privileges on Unix-like systems.

Alternatively just copy the file to where you want it!

If you’re using Windows then there is an installer available from the downloads tab on the project’s homepage.

Unit Tests

To run the unit tests:


The unit tests should all pass for Python 2.4, 2.5 and 2.6.

The bitstring module has been released as open source under the MIT License. Copyright (c) 2009 Scott Griffiths

For more information see the project’s homepage on Google Code: <>

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bitstring, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size (471.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page