Skip to main content

Pretty-print the GB electricity generation mix in your terminal

Project description

gbeng

Pretty-print the GB electricity generation mix in your terminal.

Data comes from the free, unauthenticated NESO Carbon Intensity API. No API key needed.

Install

pip install gbeng

Or with uv:

uv tool install gbeng

Usage

Print current mix and exit:

gbeng mix

Live display (refreshes every 2 seconds, re-fetches data every 5 minutes):

gbeng mix --live

Example output

╭─ GB Electricity Grid ────────────────────────────────────────────╮
│ Carbon intensity: 142 gCO₂/kWh (moderate)                        │
│                                                                   │
│          Generation mix                                           │
│  Fuel      Share                                                  │
│  wind      35.2%  ███████████████████████████████████            │
│  gas       28.1%  ████████████████████████████                   │
│  nuclear   20.0%  ████████████████████                           │
│  solar      8.5%  ████████                                        │
│  imports    5.0%  █████                                           │
│  hydro      2.1%  ██                                              │
│  biomass    1.1%  █                                               │
│                                                                   │
│  Fetched 12:34:56 · data from api.carbonintensity.org.uk · ^C    │
╰───────────────────────────────────────────────────────────────────╯

Development

git clone https://github.com/phalt/gb-energy-mix-cli
cd gb-energy-mix-cli
make install
make test

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbeng-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbeng-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file gbeng-0.1.0.tar.gz.

File metadata

  • Download URL: gbeng-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gbeng-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94cd85691fbec6a284ec60817f55fc7a3690452afe57fb4d8b06711a4db66e5a
MD5 a9da1e6233b70d3d23b896cc39f3e05d
BLAKE2b-256 754555657169ea76ce4dd526fcc19685658478c96611819a386840fbc07409b0

See more details on using hashes here.

File details

Details for the file gbeng-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gbeng-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gbeng-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac4305f02ba237d22f8933d8c35434ff9d0fdfc5699ed1a5a89931c158e0f8d9
MD5 2657d2806da85681a7ab24ec81952ca7
BLAKE2b-256 d916e07343a15af046de16dda5af3bbb81d6808f0caa98daecb4da3361ac9ab1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page