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.4.0.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.4.0.tar.gz
.
File metadata
- Download URL: namedranges-0.4.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb3793d6a04968bf6802fb2194cc46d011688bbc2f2ecd18b91a6f916a3410e6 |
|
MD5 | 00d7063b6ba484376159f5ceb097873a |
|
BLAKE2b-256 | 9117e9ff1c3bc57057763d97824d84fca9a5142e70372bab8ec4fb7599ad0b25 |
File details
Details for the file namedranges-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.6 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 | f6fe2e39d3541b1277957265a42f6e684d70273b644e8200734bc617a2c660e1 |
|
MD5 | f6b1658c99f34861ca869a3095a449fd |
|
BLAKE2b-256 | 620e1aa3f4b006d27fb5476256afeb71e9cdbc8c4c106e27a9a34c82e063e07e |