pyroaring
Library for handling efficiently sorted integer sets.
Install
pyroaring on PyPI
pip
pip install pyroaringuv
uv add pyroaringpoetry
poetry add pyroaringPackage facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 111 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pyroaring-1.1.0-cp310-cp310-macosx_14_0_arm64.whl; pyroaring-1.1.0-cp310-cp310-macosx_14_0_universal2.whl; pyroaring-1.1.0-cp310-cp310-macosx_14_0_x86_64.whl; pyroaring-1.1.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pyroaring-1.1.0-cp310-cp310-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl; pyroaring-1.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pyroaring-1.1.0-cp310-cp310-musllinux_1_2_aarch64.whl; pyroaring-1.1.0-cp310-cp310-musllinux_1_2_armv7l.whl; pyroaring-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; pyroaring-1.1.0-cp310-cp310-win32.whl; pyroaring-1.1.0-cp310-cp310-win_amd64.whl; pyroaring-1.1.0-cp310-cp310-win_arm64.whl; pyroaring-1.1.0-cp311-cp311-macosx_14_0_arm64.whl; pyroaring-1.1.0-cp311-cp311-macosx_14_0_universal2.whl; pyroaring-1.1.0-cp311-cp311-macosx_14_0_x86_64.whl; pyroaring-1.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pyroaring-1.1.0-cp311-cp311-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl; pyroaring-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pyroaring-1.1.0-cp311-cp311-musllinux_1_2_aarch64.whl; pyroaring-1.1.0-cp311-cp311-musllinux_1_2_armv7l.whl
About pyroaring
from the package's own PyPI description — quoted content, verbatim
|Documentation Status|
An efficient and light-weight ordered set of integers.
This is a Python wrapper for the C library CRoaring <https://github.com/RoaringBitmap/CRoaring>__.
Example
You can use a bitmap nearly as the classical Python set in your code:
.. code:: python
from pyroaring import BitMap
bm1 = BitMap()
bm1.add(3)
bm1.add(18)
print("has 3:", 3 in bm1)
print("has 4:", 4 in bm1)
bm2 = BitMap([3, 27, 42])
print("bm1 = %s" % bm1)
print("bm2 = %s" % bm2)
print("bm1 & bm2 = %s" % (bm1&bm2))
print("bm1 | bm2 = %s" % (bm1|bm2))
Output:
::
has 3: True
has 4: False
bm1 = BitMap([3, 18])
bm2 = BitMap([3, 27, 42])
bm1 & bm2 = BitMap([3])
bm1 | bm2 = BitMap([3, 18, 27, 42])
The class BitMap is for 32 bit integers, it supports values from 0 to 2**32-1 (included).
For larger numbers, you can use the class BitMap64 that supports values from 0 to 2**64-1 (included).
Installation from Pypi with pip
Supported systems: Linux, MacOS or Windows, Python 3.9 or higher. Note that pyroaring might still work with older Python versions, but...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Provides an efficient, ordered set data structure for 32-bit and 64-bit integers using a Python wrapper around the C library CRoaring, supporting set operations like union, intersection, and membership testing.
Medium install friction due to compiled C extension requiring a C compiler when building from source; however, prebuilt wheels are available for Python 3.9–3.14 across Linux, macOS, and Windows, making pip installation straightforward on most platforms. Repository is actively maintained with recent commits.
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Usage
pip install pyroaring
from pyroaring import BitMap
bm = BitMap([3, 18, 27])
print(3 in bm) # True
print(bm & BitMap([3, 42])) # BitMap([3])
Prebuilt wheels available for Python 3.9–3.14; building from source requires a C compiler.
Verdict: A well-maintained, actively developed library offering significant performance advantages for integer set operations over Python's built-in set. No known vulnerabilities, permissive MIT license, and broad platform/Python version support make it a low-risk choice for applications requiring efficient integer collections.
Needs verification
- Whether the 111 days since last release indicates a stable maintenance cadence or potential slowdown in active development.
- Performance characteristics compared to built-in set for typical use cases in your application domain.
Similar packages
copyleft · top 1,000 on PyPI
ml-dtypespermissive · top 1,000 on PyPI
lightgbmunclear · top 1,000 on PyPI
sortedcontainerspermissive · top 1,000 on PyPI
orderly-setpermissive · top 1,000 on PyPI
preshedpermissive · top 1,000 on PyPI
xxhashpermissive · top 1,000 on PyPI
joblibpermissive · top 1,000 on PyPI
buildpermissive · top 1,000 on PyPI
azure-datalake-storepermissive · top 1,000 on PyPI