Portion Library for Python Intervals

JSON →
library 2.6.1 ·python
verified May 21, 2026

The portion library (current version 2.6.1) provides a robust data structure and operations for intervals in Python. It supports various types of intervals (closed, open, finite, semi-infinite) with any comparable objects, including interval sets (disjunctions of atomic intervals). The library offers automatic simplification, comparison, transformation, intersection, union, complement, difference, containment, and discrete iteration, along with a dict-like structure (`IntervalDict`) to map intervals to data. It is actively maintained with regular releases.

total hits 8
actors 5 distinct systems
last hit 3d ago AhrefsBot
GPTBot
2
Script
2
ClaudeBot
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France