procset.py
Toolkit to manage sets of closed intervals.
procset is a pure python module to manage sets of closed intervals. It can be used as a small python library to manage sets of resources, and is especially useful when writing schedulers.
Features
Free Software: licensed under LGPLv3 (see LICENSE.rst).
Pure Python module :)
Thoroughly tested!
Drop-in replacement for interval_set (see intsetwrap.py).
Limitations
The provided implementation target only Python 3 (I do not want to maintain old stuff :P).
The intervals bounds have to be non-negative integers.
Requirements
setuptools>=34.4.0
Example use
What does it look like to use procset? Here is a simple example program:
from procset import ProcSet
free_cores = ProcSet((0, 7)) # I have 8 cores to work with
job_cores = ProcSet((2, 5)) # let's use some cores for a job
free_cores -= job_cores
print('remaining cores:', str(free_cores))
And it looks like this when run:
$ python example.py
remaining cores: 0-1 6-7
Metadata
Release files for procset 1.0
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 | Actions |
|---|---|---|---|---|
| procset-1.0.tar.gz | 165.2 kB | Without provenance | Details for procset-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| procset-1.0-py3-none-any.whl | Python 3 | none | any | Details for procset-1.0-py3-none-any.whl |
Total release size: 177.5 kB
Release files / procset-1.0.tar.gz
| Download URL | procset-1.0.tar.gz |
|---|---|
| Size | 165.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10921a4fe902822b6d4c94691abbf1965a29bc81157215f1a9092305e21fc146
|
|
BLAKE2b-256 checksum How to use checksums |
ff9717a02573b1842204a2cf8a1328221b41cd120bc450c872a4de14405aeb74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2+
|
Release files / procset-1.0-py3-none-any.whl
| Download URL | procset-1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6804d642f59bc4a88046c34fe42840e09d72b71d5504678c0b09ac0de1b98af9
|
|
BLAKE2b-256 checksum How to use checksums |
16c87e64f7a08fd6fa72df8f332b06821ff757dd091e3ada4494f920a85c1caa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2+
|
Security for procset 1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.