bio-pype-carbon-intensity
Grid carbon intensity (gCO2eq/kWh); current values and forecasts from
free public APIs. Built for compute.bio /
bio-pype but usable standalone; the Python
import name is carbon_intensity. Not affiliated with carbonintensity.org.uk
or any of the upstream data providers. This package just organises their
great public data. MIT licensed.
| Zones | Source | Forecast | Notes |
|---|---|---|---|
EU bidding zones (FR, DE_LU, …) |
ENTSO-E Transparency (key required) | ✓ | consumption-based via iterative flow tracing |
GB + 17 DNO regions (GB-LONDON, …) |
carbonintensity.org.uk (no key) | ✓ 48h | precomputed by NG ESO; also pinned into the EU solve |
AU-NSW1 … AU-VIC1, AU-WEM |
OpenElectricity (free key) + AEMO NEMWEB (no key) | ✓ ~40h (NEM), climatology (WEM) | production-based |
| anything else | Electricity Maps (personal key) / compute.bio backend | ✓ / – | escape hatch |
The core package has no dependencies (stdlib only). The multi-zone
backend bulk path needs the backend extra:
pip install bio-pype-carbon-intensity # worker / single-zone use
pip install bio-pype-carbon-intensity[backend] # bulk window fetch + EU flow tracing
Usage
from carbon_intensity import get_current, get_forecast, run_window
rec = get_current("GB-LONDON") # one or two HTTP calls
print(rec.intensity_g_per_kwh, rec.kind)
for slot in get_forecast("AU-NSW1"): # AEMO pre-dispatch, ~40h ahead
print(slot.start, slot.intensity_g_per_kwh, slot.extra["method"])
# backend bulk (needs [backend] extra for EU zones):
import datetime as dt
now = dt.datetime.now(dt.timezone.utc)
results = run_window(["FR", "BE", "GB", "AU-NSW1"], now - dt.timedelta(hours=4),
now + dt.timedelta(hours=24))
API keys via env vars: ENTSOE_API_KEY, OPENELECTRICITY_API_KEY,
ELECTRICITY_MAPS_API_KEY, COMPUTE_BIO_API_URL/COMPUTE_BIO_TOKEN — or
pass a ProviderConfig explicitly.
Method caveat for EU zones: get_current() / get_forecast() on an
ENTSO-E zone return production intensity (single-zone fast path, labeled
extra["method"] = "production_only") — they do not account for
imports/exports. Consumption intensity for EU zones requires the flow-traced
run_window() (or the compute_bio provider, which serves a backend's
flow-traced value). Don't compare fast-path numbers against consumption-based
sources such as Electricity Maps.
Forecast caveats: WEM (Western Australia) uses a 7-day hour-of-day
climatology, not a physical forecast; NEM forecasts assume the current
thermal mix holds. The method is labeled in each record's extra["method"].
Run the test suite: python tests/smoke.py (live UK checks need network;
ENTSO-E/AU live checks run when keys are set).
Metadata
Release files for bio-pype-carbon-intensity 0.1.1
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 |
|---|---|---|---|---|
| bio_pype_carbon_intensity-0.1.1.tar.gz | 33.3 kB | Without provenance | Details for bio_pype_carbon_intensity-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bio_pype_carbon_intensity-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bio_pype_carbon_intensity-0.1.1-py3-none-any.whl |
Total release size: 74.6 kB
Release files / bio_pype_carbon_intensity-0.1.1.tar.gz
| Download URL | bio_pype_carbon_intensity-0.1.1.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10d04d5501af53052b57ed7332dca585c57a0a04df655e9cf41fea50721d5ca9
|
|
BLAKE2b-256 checksum How to use checksums |
d74c564c52b5de57ca61e2cbcfb1ac605f06b887a78644ea2ee684bf3d649f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / bio_pype_carbon_intensity-0.1.1-py3-none-any.whl
| Download URL | bio_pype_carbon_intensity-0.1.1-py3-none-any.whl |
|---|---|
| Size | 41.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f10c6333e6a10e397dd12beb7421d7be2588de14795563d2163e0d4a0dd1e62
|
|
BLAKE2b-256 checksum How to use checksums |
52f019ab9f51116629181b6a88d7a9ded5a33db022c8caab44fdf707970e072c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for bio-pype-carbon-intensity 0.1.1
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.