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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for rangeutils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 360b609d08812addaf8b23ff2baaa0901404e7c052173ea6364633b012578275
MD5 2122da9d804aa15fd04e59dfb110fffe
BLAKE2b-256 19861eccd7c8616110f3d4ac2afb422f5fd943f6efe9a96f1ed0166d08bfefe4

See more details on using hashes here.

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

Hashes for rangeutils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ce98356bd8d86e0873001e8c3a18a79faed6ad07d6a938f1f9872ac5b0ae5c
MD5 2a5216137f83282a3d664d648ffa7a3b
BLAKE2b-256 4b37e39fff9d3515a5aa3811b04333b0bbe01f36d25b21f76ae43bcba1a68f80

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