{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/2"},{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/2"},{"label":"Information Analysis","url":"https://skillfed.io/packages/category/scientific-engineering-information-analysis"},{"label":"Markup","url":"https://skillfed.io/packages/category/text-processing-markup"},{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic"},{"label":"Bio-Informatics","url":"https://skillfed.io/packages/category/scientific-engineering-bio-informatics"},{"label":"General","url":"https://skillfed.io/packages/category/text-processing-general"}],"enrichment":{"capability":"A self-balancing interval tree data structure that stores and queries overlapping or enveloped ranges, supporting point lookups, range overlaps, and range envelopment queries.","skillfed_tags":["data-structure","interval-queries","range-search"],"use_cases":["Tag text spans or time intervals in documents or logs, then query which tags overlap a given point or range.","Store scheduling or calendar events and find all events that overlap or are contained within a time window.","Manage genomic or biological sequence annotations where intervals represent features and you need to query overlaps.","Index spatial or temporal data where you need fast overlap detection between ranges without manual tree balancing.","Implement interval-based caching or memoization where you store results for ranges and retrieve them by overlap."],"what_it_does":"intervaltree is a mutable, self-balancing interval tree for Python that stores ranges (intervals) and allows efficient queries by point, by range overlap, or by range envelopment. It was designed to support tagging text and time intervals, where intervals include the lower bound but exclude the upper bound. The package provides a rich API for insertion, deletion, and querying, as well as set-like operations (union, difference, intersection) and restructuring methods (merge, chop, slice).\n\nThe tree automatically maintains balance using AVL rebalancing, so you can add and remove intervals without manually managing the structure. It depends only on sortedcontainers for its underlying sorted storage, keeping the dependency footprint minimal. The library supports both Python 2.7 and modern Python versions (3.5 through 3.14), making it suitable for legacy and current codebases alike.","worth_installing":"Yes. intervaltree is a stable, well-maintained library with low install friction, permissive licensing, no known vulnerabilities, and a focused, proven API for a common data structure problem. Install it if you need to store and query overlapping or enveloped ranges; the self-balancing design and rich query interface make it significantly easier than building your own tree."},"id":"intervaltree","links":{"html":"https://skillfed.io/packages/intervaltree","md":"https://skillfed.io/packages/intervaltree.md","pypi":"https://pypi.org/project/intervaltree/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-12-24","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"intervaltree","python_support":"supports_current","summary":"Editable interval tree data structure for Python 2 and 3"},"popularity":{"monthly_downloads":6271448,"position":1942,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.2.1"}
