Skip to main content

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)

Source distribution for procset 1.0
File Size Uploaded
procset-1.0.tar.gz 165.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for procset 1.0
File Interpreter ABI Platform
procset-1.0-py3-none-any.whl Python 3 none any Details

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+
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page