cafein.lca
Life-cycle assessment of urban passenger transport in Python.
cafein.lca computes life-cycle energy use and greenhouse-gas emissions
of urban transport modes per passenger-km and per vehicle-km, decomposed
into vehicle and battery manufacturing, delivery, use, the servicing of
shared fleets, and infrastructure; the first four are also available per
vehicle. It covers 56 modes, from
private e-scooters to metro trains. The main assumptions behind a result
are named parameters (electricity mix, vehicle lifetime, mileage,
occupancy, battery size, servicing logistics), while the per-mode
technical data and the shared coefficient tables ship as packaged data.
The calculation is a standard attributional life-cycle assessment. The
default coefficient set, itf-2020, is extracted from the International
Transport Forum's Good to Go? study (see the attribution below) and is
held to that source by the test suite; TransportLCA(coefficients=...)
names the set, so later sets can coexist. Regional scenarios replace selected
assumptions, such as occupancy, lifetimes and mileage, with sourced local
values while the remaining defaults stay in force; each scenario carries
best, central and worst cases with the evidence and source behind every
value, and an Indian metropolitan scenario is packaged.
cafein.lca is part of the cafein family
of packages. It installs and runs on its own and does not require the
cafein core package.
Installation
Until the first release is on PyPI, install from the repository:
pip install git+https://github.com/cafein-py/cafein.lca.git
Once 0.1.0 is released, pip install cafein.lca will do the same.
Example
A session holds the electricity mix, and a calculation returns the result for one mode. This computes the life-cycle emissions of a battery-electric car on the EU 28 grid, in g CO₂e per passenger-km:
from cafein.lca import TransportLCA
lca = TransportLCA(power_mix="EU 28")
car = lca.calculate("private_car_bev")
round(car.ghg_per_pkm, 1)
That number is the whole-life total; car.per_pkm breaks it into the
five components, and lca.summary() runs every mode at once. Changing
assumptions, custom electricity mixes and scenarios are covered in the
documentation below.
Documentation
The documentation at https://cafein-lca.readthedocs.io covers:
- Getting started: installation and a first calculation.
- User guide: reading results, modes and parameters, the electricity mix, sensitivity analysis.
- Scenarios: reusable, evidence-tagged assumption bundles.
- The model: scope, stages, normalisation, provenance of the coefficients, and the audit of the source model.
- API reference.
Related tools
- carculator (Paul Scherrer
Institut) and its siblings provide fully parameterised vehicle LCA over
ecoinvent-style background databases, with many midpoint indicators,
prospective scenarios and Monte Carlo.
cafein.lcainstead packages its own coefficients for greenhouse gas and energy only, and covers the mobility-services layer that vehicle LCAs usually omit: servicing of shared fleets, deadheading of taxis and ridesourcing, and infrastructure for every mode. - Brightway2 / lca_algebraic — general LCA frameworks; this library deliberately stays a lightweight domain model on plain pandas.
Data attribution and license
The Python code is MIT-licensed. The packaged datasets are extracted from the ITF workbook © OECD/ITF 2020, used and adapted with citation under the OECD terms and conditions; several coefficients within it derive from Argonne National Laboratory's GREET model. This is an adaptation of OECD/ITF work and is not endorsed by the OECD. Cite the original work when using the numbers:
Cazzola, P. and P. Crist (2020), Good to Go? Assessing the Environmental Performance of New Mobility, International Transport Forum, Paris. https://www.itf-oecd.org/good-go-assessing-environmental-performance-new-mobility
Metadata
Release files for cafein.lca 0.1.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 | |
|---|---|---|---|
| cafein_lca-0.1.0.tar.gz | 41.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cafein_lca-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.7 kB
Release files / cafein_lca-0.1.0.tar.gz
| Download URL | cafein_lca-0.1.0.tar.gz |
|---|---|
| Size | 41.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26fd827e0ad69276bc6b500eacb60a43a5d0d969813716c8d0b4d0e4993415ae
|
|
BLAKE2b-256 checksum How to use checksums |
fb189adf8c15e55172b14706748ae83b6f7a5220173ef396fe43c339fbc9e5e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / cafein_lca-0.1.0-py3-none-any.whl
| Download URL | cafein_lca-0.1.0-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99134a1ffc5396bd35223978a6d2ba01ece31a7ff183415ae2a1979b54612a27
|
|
BLAKE2b-256 checksum How to use checksums |
fbbaaebbeaffe0ad94984f2a387c775236439ac582f53d5455e5e57dbe18afb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency log