intervals
Python tools for handling intervals (ranges of comparable objects).
Decision gist · record as of 2026-08-14
Yes, if you need straightforward interval arithmetic and can accept an unmaintained package. The library is stable for its core use case and has no known vulnerabilities. However, do not adopt it for new projects requiring long-term support or compatibility with future Python versions—the last commit was 2022-05-05 and no maintenance is expected. Suitable for legacy codebases or internal tools where you control the Python version.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel.
- However, the package is abandoned—last commit was 2022-05-05 and no releases since 2021-07-02.
- While it has 108 repository stars, the lack of maintenance means bug fixes and compatibility updates are unlikely.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include the license notice.
last release 2021-07-02 (1869 days) · last repo commit 2022-05-05 · 108 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 245,244 downloads/mo, #8,737 on PyPI
Alternatives
Verify before relying
pip install intervals
from intervals import IntInterval
interval = IntInterval.closed(1, 5)
print(interval.lower, interval.upper)- Whether the package works reliably with Python versions released after 2022 (last commit date).
- Current compatibility with modern versions of the infinity dependency.
What it is and what it does
intervals is a Python library for creating and working with mathematical intervals—ranges defined by lower and upper bounds with configurable inclusion rules. It supports multiple interval types (IntInterval, FloatInterval, DateInterval, DateTimeInterval, etc.) and allows you to define open intervals (excluding endpoints), closed intervals (including both), or half-open variants. You can initialize intervals via factory methods like closed(), open_closed(), or from string representations like '[1, 5]' or '1 - 5'.
The library provides properties to query interval characteristics (length, radius, centre, whether it's degenerate or empty) and supports standard operations like containment checks and comparisons. Its single runtime dependency is infinity, a lightweight package for representing infinite bounds. The package is pure Python and installs with low friction, but has been abandoned since mid-2022, so it receives no maintenance or updates.
Use it for
- Represent and validate time ranges or scheduling windows to check if a date falls within a booking or availability interval.
- Define numeric ranges for data validation, filtering, or binning—for example, categorizing sensor readings into interval buckets.
- Build interval trees or perform range queries to test membership, overlap, or containment of comparable values.
- Parse and manipulate human-readable interval notation from configuration files or user input using from_string.
- Model mathematical or scientific computations involving bounded domains, such as function domains or parameter ranges.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need straightforward interval arithmetic and can accept an unmaintained package.
The library is stable for its core use case and has no known vulnerabilities. However, do not adopt it for new projects requiring long-term support or compatibility with future Python versions—the last commit was 2022-05-05 and no maintenance is expected. Suitable for legacy codebases or internal tools where you control the Python version.
Install
intervals on PyPI
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last commit was 2022-05-05 and no releases since 2021-07-02. While it has 108 repository stars, the lack of maintenance means bug fixes and compatibility updates are unlikely.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install intervals
from intervals import IntInterval
interval = IntInterval.closed(1, 5)
print(interval.lower, interval.upper)
Verify before relying
- Whether the package works reliably with Python versions released after 2022 (last commit date).
- Current compatibility with modern versions of the infinity dependency.
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageinfinity |
| Maintenance | Abandoned 1,869 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 245,244 / month, #8,737 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: intervals-0.9.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “interval range handling”
- intervalsProvides Python classes for representing and manipulating intervals…
- portionportion provides data structures and operations for working with…
- DateTimeRangeDateTimeRange creates and manipulates time range objects, supporting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also infinity · portion · python-ranges · intervaltree · igwn-segments · ncls · pyranges · pyiotools · MAPIE · DateTimeRange