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.6.0.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.6.0.tar.gz
.
File metadata
- Download URL: namedranges-0.6.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b7a58d8fab8a99709847ed439952fb49c5f06927c37890cb787343cf47a3bdb |
|
MD5 | 11fa4d0616c27b95db7ce0efe375b9a1 |
|
BLAKE2b-256 | 69a53feef146f9b96ba6b8038451ea98841677d016ced5c0d7b36358253b7bd4 |
File details
Details for the file namedranges-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.1 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 | b6e0d1298580655823dd4dd74e4650d9e164db0780c6a15c78abf8334af17f98 |
|
MD5 | 6c0f0af4cc98a6a41e7a3b4ef41c2414 |
|
BLAKE2b-256 | 04e32bb74c72733a426dd485158fee5309478cf8a9f25954cb8c443b8b2c661f |