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.7.1.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file namedranges-0.7.1.tar.gz.
File metadata
- Download URL: namedranges-0.7.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be6ecc8201e9abb8f627fdf8fc6a600194ae557bbf06fc85d6d120495acc1968
|
|
| MD5 |
872d9415c51ffa5fa78c9f3259d6f369
|
|
| BLAKE2b-256 |
06e3ff53a8b614c9ddffd86a777f7fdc5b76a583b4abac34f1f4d2d6695c17c4
|
File details
Details for the file namedranges-0.7.1-py3-none-any.whl.
File metadata
- Download URL: namedranges-0.7.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b01f4d6d59f6e2e62e9f7f33d42e9750d57c376d82991ba85250fe088e6da8b3
|
|
| MD5 |
6545a48e4f08ffecd4d6d13911f140cd
|
|
| BLAKE2b-256 |
12918c1705bf021dd9050201da9feceb9ce41938e9cbc107d124dc0aa61fe864
|