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.8.0.tar.gz
(5.7 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.8.0.tar.gz.
File metadata
- Download URL: namedranges-0.8.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab6d644a2ad4241a01d4c29ffd5e4f5b234c51bbe20bf20a6e3be3a67eaa8d2
|
|
| MD5 |
b1383e79a9b433854f9c5d964b300eb2
|
|
| BLAKE2b-256 |
b3bce8f2cdbfca016813d821e59ac90d00167fe1b2d5b707e658a69bc800bd4b
|
File details
Details for the file namedranges-0.8.0-py3-none-any.whl.
File metadata
- Download URL: namedranges-0.8.0-py3-none-any.whl
- Upload date:
- Size: 6.3 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 |
3cd8862388b9053526083f0a332399675da4ada82c23f48e808d214ee39c2ec4
|
|
| MD5 |
91322c4134e77f16bfbefdaaace993f2
|
|
| BLAKE2b-256 |
cb50798365ba7726d9ac447b5273120083c98e4b703abe2ef83c103fe4896ad9
|