Utilities for manipulating and converting Python ranges and boolean lists
Project description
rangeutils
rangeutils
is a Python package that provides utilities for converting, manipulating, and processing Python range
objects and boolean lists. This package includes a variety of functions to convert between boolean lists and ranges, merge adjacent ranges, find complementary ranges, and trim ranges based on specific conditions.
Features
- Convert lists to ranges: Convert
[start, end]
lists to Python range objects, with optional handling forNone
values. - Boolean list to ranges: Converts a boolean list to a list of range objects representing
True
or1
sequences. - Ranges to boolean list: Converts a list of ranges back to a boolean list of specified length.
- Flip ranges: Generate complementary ranges that are not covered by input ranges.
- Fill ranges: Fill ranges that are within a specified gap size.
- Trim ranges: Perform trimming on ranges based on length, percentage, or a specified trimming size.
Installation
You can install rangeutils
using pip:
pip install rangeutils
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rangeutils-0.1.1.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file rangeutils-0.1.1.tar.gz
.
File metadata
- Download URL: rangeutils-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360b609d08812addaf8b23ff2baaa0901404e7c052173ea6364633b012578275 |
|
MD5 | 2122da9d804aa15fd04e59dfb110fffe |
|
BLAKE2b-256 | 19861eccd7c8616110f3d4ac2afb422f5fd943f6efe9a96f1ed0166d08bfefe4 |
File details
Details for the file rangeutils-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: rangeutils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9ce98356bd8d86e0873001e8c3a18a79faed6ad07d6a938f1f9872ac5b0ae5c |
|
MD5 | 2a5216137f83282a3d664d648ffa7a3b |
|
BLAKE2b-256 | 4b37e39fff9d3515a5aa3811b04333b0bbe01f36d25b21f76ae43bcba1a68f80 |