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
Note that if you use uv you don't even need to install it, just run uvx!
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 2026-04-23 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
Metadata
Release files for gbeng 0.2.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 |
|---|---|---|---|---|
| gbeng-0.2.0.tar.gz | 13.9 kB | Without provenance | Details for gbeng-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gbeng-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for gbeng-0.2.0-py3-none-any.whl |
Total release size: 18.7 kB
Release files / gbeng-0.2.0.tar.gz
| Download URL | gbeng-0.2.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ed99d0d32222da1618bad331683701bd5b31a11f771e1c4fe1b00428845c980
|
|
BLAKE2b-256 checksum How to use checksums |
8c4cb94ec114c258c31d448e4e2b7be5f9a55ecc563fd82ff553de3409a66653
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / gbeng-0.2.0-py3-none-any.whl
| Download URL | gbeng-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d4d2e4028286198e28f5be76c5ff96694908f74af3de93b5fb9b65d5d8adbc4
|
|
BLAKE2b-256 checksum How to use checksums |
ad36fca94d11741f288577b67e78947aa67d17ad8d1ca57812bcebc332036065
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for gbeng 0.2.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.