Database export · openLCA package

Export openLCA packages

Save a loaded LCA database as an openLCA JSON-LD ZIP that openLCA imports and VoLCA reads back into the same inventories. Choose this destination when your next workflow needs openLCA package.

What is openLCA package?

An openLCA package is the JSON-LD ZIP that openLCA imports and exports: one JSON document per process, flow, flow property, unit group, and location, linked by their identifiers.

What you get

One ZIP archive with openlca.json and the folders processes/, flows/, flow_properties/, unit_groups/, and locations/. Each activity and reference-product pair becomes a process.

Export value: openlca

Start with a loaded database

Import and load your source database on a running VoLCA server first. Uploading a file alone is not enough. Replace my-database with the loaded database name.

Review load warnings and supplier dependencies before exporting. Only export and share data your license allows you to use.

Choose an import path →

Save the database to a file

These CLI and Python examples address your running server. Smoke checks used VoLCA v0.12.0 and pyvolca 0.11.0 with a synthetic single-product database. All five CLI file-generation operations completed. openpyxl exposed an OOXML manifest defect in the v0.12.0 Brightway file; merged PR #396 adds the missing package parts, and the resulting workbook opened successfully with openpyxl. Other formats were not import-tested in receiving applications. File generation does not establish metadata fidelity, supplier-link fidelity, or acceptance by another application.

CLI

volca --config volca.toml --url http://localhost:8080 database export my-database \
  --format openlca --out database-openlca.zip

Use your existing volca.toml configuration and credentials. Replace the local URL with your server address.

Python

from volca import Client

client = Client("http://localhost:8080")
client.export_to_file("openlca", "database-openlca.zip",
                      db_name="my-database")

Install pyvolca, replace the local server URL, and supply credentials when required. Choose a new output filename to avoid replacing an existing file.

What the writer carries forward

The writer carries process names, categories, locations, products, inputs, emissions, and resources with their amounts. openLCA computed the same inventories as VoLCA on every process of the USLCI (1,590) and CORRIM (202) packages written this way. A location gets the identifier openLCA derives from its code, so it merges with the same location of the database the package is imported into.

Exports are written from VoLCA's loaded data model. They are not copies of the original source files.

Limits to check before using the file

The products of a multi-output activity become separate processes, and a coproduct without an allocation factor is written unallocated. Formulas and parameters are written as their resulting values. A line in another unit than its flow is converted to the flow's unit. An emission recorded against its compartment is written on the compartment's side, which keeps the inventory. Location codes that differ only by case become one location. An input with no supplier is left for openLCA to link to a producer. The export refuses, line by line, a unit that does not convert to its flow's unit and a waste sent to a treatment the database does not have. It is an inventory export, not an LCIA method package.

Review export warnings and errors. A file being written does not establish target-software compatibility, successful supplier linking, or equivalent LCIA results. Import and verify a compatible LCIA method separately.

Read the writer source →

Frequently asked questions

Will openLCA compute the same results as VoLCA?

For the inventories, yes on the packages checked: openLCA computed the same inventory as VoLCA for every process of the written USLCI and CORRIM packages. Impact results also depend on the LCIA method and its flow mapping in openLCA, which you verify separately.