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.5.2.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.5.2.tar.gz
.
File metadata
- Download URL: namedranges-0.5.2.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 | f1f175e70d1971b31a50ce27168c6a8490142ff429edf7935871c60e2561952d |
|
MD5 | 905b5ee63d9ec4357f4aa932346253e2 |
|
BLAKE2b-256 | dd95921131319601064035cb000add4dbfce92a3f252a1382433cc7d601e888e |
File details
Details for the file namedranges-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.5.2-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 | 1a1fa86c94142a06217009d10b620c4a398df320e46118e784e988cca195064d |
|
MD5 | f3b62124334b1db358081ae4594e0284 |
|
BLAKE2b-256 | 149cf80302a783b1367eddf4c57ba538c9208881263085a33b669ad45e1f8abe |