Green Queue displays the current carbon intensity and generation mix for a UK electricity region, together with statistics for the previous and next 24 hours. It is intended to help you choose a lower-carbon time to submit flexible HPC workloads.
Data comes from the National Energy System Operator Carbon Intensity API.
- Python 3.11 or later
- Network access to
api.carbonintensity.org.uk
Create a virtual environment and install the project:
$ python3 -m venv ~/.local/green-queue
$ ~/.local/green-queue/bin/pip install /path/to/green-computeThe command is then available at:
$ ~/.local/green-queue/bin/green-queue statusTo make green-queue available without its full path on future logins, add
this line to ~/.bashrc:
export PATH="$HOME/.local/green-queue/bin:$PATH"Reload the shell and run the command normally:
$ source ~/.bashrc
$ green-queue statusFor development, install the checkout in editable mode with its test tools:
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python -m pip install -e '.[test]'Show the status for Great Britain:
$ green-queue statusSelect another API region or change the per-request timeout (in seconds - default 10s):
$ green-queue status --region "South Scotland" --timeout 5A full list of the availble API regions use:
$ green-queue regionsRun green-queue status --help to see all status options. If the API cannot be
reached, the command prints a concise error and returns a non-zero exit code.
Times are returned by the API in UTC and displayed in the machine's local timezone.
Green Queue is licensed under the GNU General Public License version 3.