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
Release history Release notifications | RSS feed
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.2.0.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.2.0.tar.gz
.
File metadata
- Download URL: namedranges-0.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4d86a7e55b62e30640b2918b0c714177eddfccdefffb15500287f7fc0f6df7c |
|
MD5 | 57c62e57b48fbb1966b7d2b165dd6568 |
|
BLAKE2b-256 | 42e51fc72960177ac62de3a1825db946e1637a320ad3fdcc45ad05de72bd0803 |
File details
Details for the file namedranges-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebd502d5a8e27bad354639f12d18e8168e37da6fa4fcc2c4068c58e7bab7baa3 |
|
MD5 | 062ad2f2f934495ba097f673810a0e9e |
|
BLAKE2b-256 | ec0ac2af4ba2b4f579ee0d8dcd5fd461e823a56c15e0733a9b283f81285fcc20 |