DIRAC Common Utilities

9.1.6 · active · verified Sat Apr 11

diraccommon is a Python library providing stateless utilities extracted from the main DIRAC framework for use by DiracX and other projects. As of version 9.1.6, it requires Python 3.11 or later and is actively maintained with frequent integration releases, indicating a rapid development and release cadence.

Warnings

Install

Imports

Quickstart

This example demonstrates using a common utility function, `uniqueElements`, from `DIRAC.Core.Utilities.List` to process a list. Many of `diraccommon`'s utilities reside within the `DIRAC.Core.Utilities` sub-packages.

from DIRAC.Core.Utilities.List import uniqueElements

my_list = [1, 2, 2, 3, 4, 4, 5]
unique_items = uniqueElements(my_list)

print(f"Original list: {my_list}")
print(f"Unique elements: {unique_items}")

view raw JSON →