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.7.0.tar.gz (5.2 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.7.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for namedranges-0.7.0.tar.gz
Algorithm Hash digest
SHA256 a16241dd609d5c9cb174725b8b83bdfa0a2e3cb486d4d32d8729adc318ec328f
MD5 cc25a75813b3d69769c70a446138d6a9
BLAKE2b-256 74cf8bbf482768de604ba485df413c909377285555d787004ffa3f51d144e443

See more details on using hashes here.

File details

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

File metadata

  • Download URL: namedranges-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for namedranges-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15292e03f4588a0c5f04e7f911623fb8e48c2d83cd90a12db9d3eb577199facd
MD5 a2c03e44bbc9e9156f8b0f3725a717a1
BLAKE2b-256 162c923c158c8fb120f279cf5a320055b4fa69e488429de9d0cf38e3441712b2

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