Overview
Rangeset is a package that allows for easy manipulation of sets of ranges. These ranges can contain any ordered elements, be they numbers, tuples, or even datetime objects.
Installation
Use either:
python setup.py install
or:
pip install rangeset
Documentation
Basic Usage
import rangeset
# Create a rangeset
>>> r = RangeSet(1, 3) | (5, 6)
# negate
>>> (~r) & (0, 10)
<RangeSet 0 -- 1, 3 -- 5, 6 -- 10>
# "measure" - How much distance is in the ranges, minus the gaps
>>> ((~r) & (0, 10)).measure()
7
# range - Total distance between start and end
>>> ((~r) & (0, 10)).range()
10
For more usage examples, see the doctests at https://github.com/axiak/py-rangeset/tree/master/python2/rangeset/test
License
It’s licensed under the MIT License. Please see the license file for more: https://github.com/axiak/py-rangeset/blob/master/LICENSE
Metadata
Release files for rangeset 0.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rangeset-0.0.15.tar.gz | 100.3 kB | Without provenance | Details |
Release files / rangeset-0.0.15.tar.gz
| Download URL | rangeset-0.0.15.tar.gz |
|---|---|
| Size | 100.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fd4cba706466d77dbb959f94718586571f4bfab34dd146ec4fe1b7ce115e76d
|
|
BLAKE2b-256 checksum How to use checksums |
248814bb35077d145b4142bc77f94965dffeae12a3f1c755bb173ad90be45241
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.4
|
Security for rangeset 0.0.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.