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.3.0.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.3.0.tar.gz
.
File metadata
- Download URL: namedranges-0.3.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 537f3d5c720f952359239ce4c75cb45df438c32c624de5e503ad62fe885b5977 |
|
MD5 | d6ebb04b9e2c87b23048c91fced2bf6a |
|
BLAKE2b-256 | e6af066c057b3e804f0af649fd094be4954135420af3f33eefef90aa1f642a90 |
File details
Details for the file namedranges-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.8 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 | 86189cdff07e95a3a74d63c38b726d84c2272c8d4476009c9bf48b387327aed2 |
|
MD5 | 074a4b3ee838673ffa02841e64fe7f92 |
|
BLAKE2b-256 | fc83a9ee22ef86c94e44024fb34a003501d78d7cb6000f4d8cda169750e03ad8 |