Comparison
bitarray vs bitstring vs bitstruct vs construct
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
efficient arrays of booleans -- C extension
Actively maintained. Last release 2 weeks ago, commits in 24 of the last 26 weeks. A safe choice.
pip install bitarraySimple construction, analysis and modification of binary data: bit arrays, bitfields and unaligned binary formats.
Actively maintained. Last release 7 weeks ago, commits in 13 of the last 26 weeks. A safe choice.
pip install bitstringThis module performs conversions between Python values and C bit field structs represented as Python byte strings.
Maintained. Last release 5 weeks ago, commits in 3 of the last 26 weeks. Weaker on commit activity and security practices.
pip install bitstructA powerful declarative symmetric parser/builder for binary data
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install constructIn short
- construct is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- bitarray is the most used: 16.6M downloads a month, 2.6× more than construct.
- Maintenance is comparable: bitarray 83, bitstring 74, bitstruct 65 on Pythie’s Index.
- bitstring is growing fastest: downloads +26% over the last month.
- Safe default for a new project: bitarray.
Side by side
| Metric | bitarray | bitstring | bitstruct | construct |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 83 | Pythie’s Index: 74 | Pythie’s Index: 65 | Pythie’s Index: 17 |
| Verdict | Actively maintained | Actively maintained | Maintained | Slowing down |
| Downloads / month | 16.6M | 5.9M | 2.3M | 6.3M |
| Downloads, month over month | +1% | +26% | -16% | +5% |
| GitHub stars | 794 | 450 | 135 | 1K |
| Stars, last 7 days | – | – | – | – |
| Direct dependents | 288 | 210 | 49 | 238 |
| Last release | Nov 15, 2026 | Oct 11, 2026 | Oct 23, 2026 | Nov 29, 2023 |
| Releases, 12 months | 13 | 3 | 5 | 0 |
| Weeks with commits | 24 / 26 | 13 / 26 | 3 / 26 | 0 / 26 |
| Recent contributors | 4 | 5 | 9 | 14 |
| First release | Aug 2008 | Mar 2009 | May 2015 | Jan 2013 |
| Python versions | 3.7 – 3.15 | 3.11 – 3.14 | – | 3.6 – 3.11 |
| License | PSF-2.0 | MIT | MIT | MIT |
| Known vulnerabilities | None | None | None | None |
Bold marks the best value in each row. Pythie’s Index rates maintenance out of 100: how it works.