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.1.0.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.1.0.tar.gz
.
File metadata
- Download URL: namedranges-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69489006e0b5a4811c15883e8d98e4aa96a9b2e667bcbabd3cfd7acba32fba7c |
|
MD5 | 12e1c2f38867e43aacce7d46dd3260ca |
|
BLAKE2b-256 | 51888bb0603f4113100bcbaf92d905a08e1be18f83d2bf1744ba418bfb617d5b |
File details
Details for the file namedranges-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 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 | 18bdd03485d1cab77907b1d44a4fd1802b32ac9abc99991b8b6665fa98849a30 |
|
MD5 | 4ca959e77dc2a1aff14a88c8f79169c9 |
|
BLAKE2b-256 | 7848b4f5692d77f70da8c5a42e4bdc1870927f16d712720f5ef7941f076284ec |