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.0.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.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for namedranges-0.8.0.tar.gz
Algorithm Hash digest
SHA256 4ab6d644a2ad4241a01d4c29ffd5e4f5b234c51bbe20bf20a6e3be3a67eaa8d2
MD5 b1383e79a9b433854f9c5d964b300eb2
BLAKE2b-256 b3bce8f2cdbfca016813d821e59ac90d00167fe1b2d5b707e658a69bc800bd4b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for namedranges-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd8862388b9053526083f0a332399675da4ada82c23f48e808d214ee39c2ec4
MD5 91322c4134e77f16bfbefdaaace993f2
BLAKE2b-256 cb50798365ba7726d9ac447b5273120083c98e4b703abe2ef83c103fe4896ad9

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