Registry / data / intbitset

intbitset

JSON →
library4.1.2pypypi✓ verified 84d ago

C-based extension implementing fast integer bit sets. Provides a set-like object for non-negative integers optimized for memory and speed. Latest version 4.1.2 (2025). Development is active with periodic releases.

pip install intbitset
INSTALL
IMPORT
SIG · INTBITSET
I
intbitset
datapythonv4.1.2
Install
1.5s avg
Import
Disk
17MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 1.6s
py 3.11
✓ —
✓ 1.6s
py 3.12
✓ —
✓ 1.5s
py 3.13
✓ —
✓ 1.4s
py 3.9
✕ build_error
✕ build_error
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

intbitset
from intbitset import intbitset
import intbitset
intbitset is the class, not a module. Use 'from intbitset import intbitset'.

Create an intbitset from a list, add elements, check membership, and print.

from intbitset import intbitset s = intbitset([1, 2, 3, 1000]) s.add(4) print(2 in s) # True print(len(s)) # 5 print(s) # intbitset([1, 2, 3, 4, 1000])
Debug
Known issues
breakingIn version 4.0.0, the C buffer protocol was reworked. Python 2 support dropped. Code relying on buffer protocol details may break.
fix
Upgrade to 4.x and use standard Python buffer protocol interfaces if needed.
affects: <4.0.0
deprecatedPython 3.7 support was dropped in v3.1.0. Python 3.8 and older may be dropped in future releases.
fix
Use Python 3.9 or later.
affects: >=3.1.0
gotchaintbitset only supports non-negative integers. Adding negative numbers raises ValueError.
fix
Ensure all values are >= 0 before adding to intbitset.
affects: all
gotchaintbitset is not hashable. Cannot be used as a dictionary key or in a set of sets.
fix
Convert to a tuple or use frozenset if hashing is required.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'intbitset'
Installed the wrong package (e.g., 'bitarray' or forgot to install).
fix
Run 'pip install intbitset'
ImportError: cannot import name 'intbitset' from 'intbitset'
Wrong import path.
fix
Use 'from intbitset import intbitset'
ValueError: intbitset() argument must be a sequence of non-negative integers
Tried to initialize with negative numbers or non-integers.
fix
Ensure all elements are integers >= 0.
Upgrade
Version history
4.1.2latest on PyPI · released Apr 28, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
intbitset — pip install intbitset · libregistry