Skip to main content

Named ranges with utilities for index reflows

Project description

namedranges

This lib provides a simple way to work with intervals/ranges in Python using a tuple representation for each interval and a string annotation.

Installation

pip install namedranges

Usage

ranges = {
    "1": (1, 5),
    "2": (6, 22),
    "3": (23, 26),
    "4": (27, 38)
}

nr = namedrange.from_dict(ranges)
nr.add_gaps([(10, 10)])
complement = nr.complement()
print(complement)

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

namedranges-0.4.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

namedranges-0.4.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file namedranges-0.4.0.tar.gz.

File metadata

  • Download URL: namedranges-0.4.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for namedranges-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cb3793d6a04968bf6802fb2194cc46d011688bbc2f2ecd18b91a6f916a3410e6
MD5 00d7063b6ba484376159f5ceb097873a
BLAKE2b-256 9117e9ff1c3bc57057763d97824d84fca9a5142e70372bab8ec4fb7599ad0b25

See more details on using hashes here.

File details

Details for the file namedranges-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: namedranges-0.4.0-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.12.7

File hashes

Hashes for namedranges-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fe2e39d3541b1277957265a42f6e684d70273b644e8200734bc617a2c660e1
MD5 f6b1658c99f34861ca869a3095a449fd
BLAKE2b-256 620e1aa3f4b006d27fb5476256afeb71e9cdbc8c4c106e27a9a34c82e063e07e

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