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.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file namedranges-0.4.1.tar.gz
.
File metadata
- Download URL: namedranges-0.4.1.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 | 759d4760ada41cdbcfd7602d4bbcb94eb21ccda49b1e9f07c259bfa395b89042 |
|
MD5 | 26e9707b479bcae9b7d1d4d5662ea14e |
|
BLAKE2b-256 | a29317f9b7bb2810179aea10189d3417fb203040c4af511bec60d8606dfa2aef |
File details
Details for the file namedranges-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: namedranges-0.4.1-py3-none-any.whl
- Upload date:
- Size: 4.7 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 | 3c7de77fbbc16ca1d2fbdbe71a9a233fc6be494901d54ccdac9e7573b33ec4d2 |
|
MD5 | 002e432074cba1982e819553f1a42992 |
|
BLAKE2b-256 | ee2d8051a3fb901d05a872f19c9bbab5c0417c1cb0de5c0d0ead0bb36e998faf |