{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/18"}],"enrichment":{"capability":"Provides Range, RangeSet, and RangeDict data structures for representing continuous and non-continuous ranges of values, and for using ranges as dictionary keys.","skillfed_tags":["data-structures","interval-arithmetic"],"use_cases":["Implement tax bracket or tiered pricing logic by mapping income or price ranges to corresponding rates or fees.","Validate user input by checking if a value falls within acceptable bounds using membership testing.","Clamp numeric or comparable values to a range without verbose min/max nesting.","Build interval-based queries or lookups where you need to find which range a value belongs to.","Perform set operations on date ranges, version ranges, or other comparable intervals."],"what_it_does":"python-ranges fills a gap in Python's standard library by providing proper continuous range data structures. The built-in range() only works with integers and doesn't support continuous values like floats or dates. This package introduces Range (a single continuous interval), RangeSet (a collection of non-overlapping ranges), and RangeDict (a dictionary that uses ranges as keys). These structures let you replace verbose if/elif/else chains and boundary-checking logic with cleaner, more readable code. For example, instead of writing multiple conditional branches to determine which tax bracket an income falls into, you can use a RangeDict to map income ranges directly to tax calculations.\n\nThe Range class supports any comparable data type\u2014numbers, strings, dates\u2014and can represent bounded or unbounded intervals with inclusive or exclusive endpoints. RangeSet provides set-like operations (union, intersection, difference) on collections of ranges. The package has zero runtime dependencies and installs easily, but development has stalled since early 2023, so it receives no active maintenance or updates.","worth_installing":"Yes, if you need range data structures and can accept abandoned maintenance. The package is stable, has no known vulnerabilities, and solves a real problem with clean syntax. However, do not rely on it for active bug fixes or compatibility updates beyond Python 3.9. It is suitable for self-contained projects where you control the Python version and can tolerate no future support."},"id":"python-ranges","links":{"html":"https://skillfed.io/packages/python-ranges","md":"https://skillfed.io/packages/python-ranges.md","pypi":"https://pypi.org/project/python-ranges/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2023-02-15","license_spdx":null,"license_treatment":"permissive","name":"python-ranges","python_support":"supports_current","summary":"Continuous Range, RangeSet, and RangeDict data structures"},"popularity":{"monthly_downloads":77689,"position":14505,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.2"}
