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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

namedranges-0.8.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: namedranges-0.8.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for namedranges-0.8.1.tar.gz
Algorithm Hash digest
SHA256 468a2c8500037317d8ee6ea53617f9080a5e278c5debb4ed8d1022bdc0114fc4
MD5 875f830ac3c4906124e84c3af700a6cf
BLAKE2b-256 ae354c365a605301056def4dc4c783113b0716bf4c3365212e4784751e989d9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: namedranges-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for namedranges-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5aaad66ef9508a5b4590fad06224365d99aef554fca0beda27875d08f14778
MD5 f1a1c2954e174327983d448818140920
BLAKE2b-256 dcb7681628d4d774bfbd507cc94f201f93325d92ec3691c17c92e434f24f7a88

See more details on using hashes here.

Supported by

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