Skip to main content

HESTIA Converters

Library to convert from/to the HESTIA format.

Quick start

Install the base library and the converter you need. Each converter is its own install extra, so you only pull the dependencies of the formats you use:

pip install hestia-earth-converters
pip install "hestia-earth-converters[SimaPro]"

hestia-convert --help is generated from the converters you installed, so it always lists exactly the formats and options available to you.

# a HESTIA ImpactAssessment, downloaded by id, as a SimaPro CSV
hestia-convert --output-folder out --input-format HESTIA --output-format SimaPro \
  --hestia-impact-id cocoaSeedWhole-ghana-2010-2025-20250916

# a file on disk, converted to HESTIA nodes
hestia-convert --output-folder out --input-format OpenLCA --output-format HESTIA \
  --input-file export.zip

Some data needs an API key, as does downloading any node with --hestia-impact-id. Create an account, copy the key from the "API Access" section of https://www.hestia.earth/profile, and set it as the API_ACCESS_TOKEN environment variable.

Where no converter goes straight from one format to another, the CLI runs the pair that does, by way of HESTIA. So every input format reaches LSRS:

hestia-convert --output-folder out --input-format Klim --output-format LSRS \
  --input-file farm.zip

runs Klim -> HESTIA, then HESTIA -> LSRS over what it wrote. The intermediate HESTIA files stay in --output-folder — they are output too, and they are what makes a chained run debuggable. --filter-by-name names a result of the first leg, and the rest of the chain sees only what it selected.

These flags apply to every conversion. Each converter adds more of its own, prefixed with its name; its README lists them.

Flag Description
--output-folder Output files folder (required)
--input-format Format to read (required)
--output-format Format to write (required)
--input-file Path to the input file
--hestia-impact-id One or more HESTIA ImpactAssessment ids to download and convert
--mapping-files-directory Folder of .csv mapping files (default: hestia-flowmaps, downloaded if absent)
--update-flowmaps Download the flowmaps when a newer version is published, rather than only warning
--skip-existing Do not overwrite files already written
--filter-by-name Names to filter results on (in quotes)
--verbose Verbose logging
--debug-file Write conversion logs to a debug file

Converters

Format Directions Install extra Docs
Cool Farm Platform Cool Farm ⇄ HESTIA [CoolFarm] README
Farm Carbon Calculator FCC ⇄ HESTIA [FCC] README
KLIM Klim → HESTIA [Klim] README
LSRS reporting spreadsheet HESTIA → LSRS [LSRS] README
openLCA openLCA ⇄ HESTIA, openLCA → LSRS [OpenLCA] README
SimaPro HESTIA → SimaPro [SimaPro] README

Term mappings come from hestia-convert-flowmaps, downloaded automatically unless --mapping-files-directory points elsewhere. Errors and omissions in a mapping belong in an issue on that repository.

A run that had to drop a flow says so, and leaves you the list. What the flowmaps do not cover is written to missing-flowmaps.txt — one line per flow, deduplicated, with the name and unit the source states for it — and the run ends by naming that file and the issue tracker to attach it to. Nothing is written when everything mapped. --missing-flowmaps-file puts it somewhere else.

# 8 flow(s) this conversion could not map, and so dropped.
# conversion: FCC -> HESTIA
# flowmaps: 20260821-8550eee8
...
# direction	nomenclature	flow	name	unit
to HESTIA	FCC	proc_00141	On-farm processing (i.e. veg boxes) - Water ... - Mains water ...	m3

The file is a record of one run against one version of the flowmaps, so it is gitignored rather than committed.

Every run checks whether a newer version has been published and warns if so, naming the version in use and the current one. It does not download it: a flowmap version is part of what produced a result, so the same command keeps giving the same answer until you say otherwise. Pass --update-flowmaps to take the new version instead.

The check reads a single 18-byte file and is advisory only — if it cannot be reached, the conversion runs on what is already on disk. Only the default hestia-flowmaps folder is checked; a folder you name is yours, whether it is edited or deliberately pinned. The version in use is recorded in hestia-flowmaps/version.txt, so a folder assembled before that file existed reports as unrecorded until it is next downloaded.

Only the bundles your install needs are downloaded. The flowmaps are published per nomenclature, and each bundle belongs to an install extra — someone who installed [FCC] gets the four FCC maps rather than all 101, which is 40KB instead of 22MB compressed. The whole archive is still what you get when the extras cannot be worked out, such as a source checkout with nothing installed. To choose the set yourself:

python download_flowmaps.py --bundle fcc klim --version-filepath tests/flowmaps-version.txt

Bundles unpack into the same folder, so several combine. An unknown name is refused before anything downloads, and the published names are listed in the error.

Adding a converter? See CONVERTER_BLUEPRINT.md. Contributing? See CONTRIBUTING.md.

Download files

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

Source Distribution

hestia_earth_converters-0.2.4.tar.gz (254.2 kB view details)

Uploaded Source

Built Distribution

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

hestia_earth_converters-0.2.4-py3-none-any.whl (330.0 kB view details)

Uploaded Python 3

File details

Details for the file hestia_earth_converters-0.2.4.tar.gz.

File metadata

  • Download URL: hestia_earth_converters-0.2.4.tar.gz
  • Upload date:
  • Size: 254.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for hestia_earth_converters-0.2.4.tar.gz
Algorithm Hash digest
SHA256 1ffe2a3889554268c572bc04644b8d0b7d20516fc60d15f3d09039c7817df1a7
MD5 7f8d54583be8624a0107de8ce355f694
BLAKE2b-256 9e9b4cb45545bc4b5b81c6510364e113e63f773293d74539a3a304e0672d454a

See more details on using hashes here.

File details

Details for the file hestia_earth_converters-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for hestia_earth_converters-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b1250763bfca78767605380cb4140252dc23ad5f5c858f2dbdcce23876ddce88
MD5 fac6b4961e38f526cadb5bf1d085011d
BLAKE2b-256 604d92344e65228bc2efcb46fa3fc0b7781797b3e0ef6739efc10455a199d855

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.6

2 files

0.0.4

2 files

0.0.2

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page