Skip to main content

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 for None values.
  • Boolean list to ranges: Converts a boolean list to a list of range objects representing True or 1 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


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.3.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

rangeutils-0.1.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file rangeutils-0.1.3.tar.gz.

File metadata

  • Download URL: rangeutils-0.1.3.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for rangeutils-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bb35eb840fb7a754a3afaa9db59369887d137339d891e031f41c08c68374306b
MD5 268777aaa2c062d7a91e299063bdb033
BLAKE2b-256 8d69a392e90ad6afa6d61472393cfa894c9446867e9cfc2cd80e4b22b32589dd

See more details on using hashes here.

File details

Details for the file rangeutils-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rangeutils-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for rangeutils-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a5531fd48c6f8ea03f9df6138bc8014d663e9c3ceac8f21352950e117db8b69f
MD5 d4d51795fcaa4bf1326060a9e206191a
BLAKE2b-256 6d9798ffe6963848c660ae2d35587511676c8febdc06193dc62854ccfd932af9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page