Skip to main content

olcaBASIC

            ___  _     ____    _    ____    _    ____  _  ____
           / _ \| |   / ___|  / \  | __ )  / \  / ___|| |/ ___|
          | | | | |  | |     / _ \ |  _ \ / _ \ \___ \| | |
          | |_| | |__| |___ / ___ \| |_) / ___ \ ___) | | |___
           \___/|_____\____/_/   \_\____/_/   \_\____/|_|\____|

A simplified language to control openLCA, borrowing heavily from the BASIC programming language (1964)

olcaBASIC lets LCA practitioners build models, run calculations, and analyse results without writing Python. It connects to openLCA via the IPC server and translates simple, readable commands into the full power of the openLCA calculation engine.

Quick start

pip install olcabasic

Start the IPC server in openLCA (Tools > Developer Tools > IPC Server), then:

python -m olcabasic
olcaBASIC v0.1.5
Connected to openLCA on port 8080
Ready.

> PRINT DATABASE
  Processes:       2608
  Flows:           177294
  Impact methods:  8
  Family:          flcac

> FIND PROCESS "cement"
  Portland cement; at plant    31-33: Manufacturing/3273: Cement and Co

> CALCULATE "Ready-mix concrete" USING "IPCC"
  AR6-100    1.769261 kg CO2 eq

Write programs

Save as mymodel.baslca and run with python -m olcabasic run mymodel.baslca:

REM Concrete block model

LET cement_mass = 300
LET sand_mass = 800

SET PROCESS FOLDER "00: My Project"
SET FLOW FOLDER "00: My Project/Flows"

PROCESS "Concrete block; at plant"
  OUTPUT NEW "Concrete block", 1, m3, PRODUCT
  INPUT "Portland cement; at plant", cement_mass, kg
  INPUT "Construction sand and gravel; at mine", sand_mass, kg
END PROCESS

SYSTEM "Concrete block; at plant"
CALCULATE "Concrete block; at plant" USING "IPCC"
PRINT RESULTS
SAVE RESULTS "concrete_results.csv"

SCENARIO "Baseline"
END SCENARIO

SCENARIO "Low cement"
  LET cement_mass = 240
END SCENARIO

RUN SCENARIOS ON "Concrete block; at plant" USING "IPCC"

How INPUT and OUTPUT work

By default, INPUT finds existing flows and processes in the database and wires them up as providers automatically. This is what connects your foreground model to the background supply chain.

OUTPUT NEW creates a new foreground product flow. INPUT NEW creates a fresh flow without linking to a provider.

OUTPUT NEW "My product", 1, kg, PRODUCT    ' creates your product
INPUT "Portland cement; at plant", 300, kg  ' finds and links to database
INPUT NEW "Custom blend", 50, kg            ' creates a new flow

Navigation

olcaBASIC includes folder navigation inspired by the Acorn Electron:

CAT                         List current folder contents
CAT *concrete*              Filter by wildcard
DIR "31-33: Manufacturing"  Navigate to folder
UP                          Go up one level
BACK                        Toggle to previous folder
CDIR "My Model"             Create and enter a folder
PWD                         Show current folders

LS works as an alias for CAT. CD works as an alias for DIR.

Parameters

Variables defined with LET become openLCA parameters. Use them in exchange amounts and they flow through to scenarios and sensitivity analysis:

LET cement_mass = 300
LET water_ratio = 0.45
LET water_mass = cement_mass * water_ratio

PROCESS "Mixing"
  INPUT "Portland cement; at plant", cement_mass, kg
  INPUT "Water", water_mass, kg
  OUTPUT NEW "Concrete", 1, m3, PRODUCT
END PROCESS

Scenarios

SCENARIO "Baseline"
END SCENARIO

SCENARIO "Low cement"
  LET cement_mass = 240
END SCENARIO

SCENARIO "High cement"
  LET cement_mass = 380
END SCENARIO

RUN SCENARIOS ON "My System" USING "IPCC"

Sensitivity

SENSITIVITY ON "My System" USING "IPCC" BY 20%
  VARY cement_mass
  VARY sand_mass
END SENSITIVITY

Full command reference

Type HELP in the REPL for the command list, or HELP PROCESS, HELP FOLDER, HELP NEW, HELP SCENARIO, HELP SENSITIVITY for detailed guidance on each topic.

Why?

Brightway is powerful but requires Python fluency. SimaPro is point-and-click but not scriptable. olcaBASIC sits in between: programmatic, reproducible LCA work that any environmental scientist can read and write on day one.

Requirements

  • openLCA 2.x with IPC server running (port 8080)
  • Python 3.10+
  • b280-olca-mcp (installed automatically)

Licence

MPL-2.0

Built by Below280. openLCA is developed by GreenDelta. BASIC was created by Kemeny and Kurtz at Dartmouth College, 1964. Navigation commands inspired by the Acorn Electron (1983).

Release files for olcabasic 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for olcabasic 0.1.5
File Size Uploaded
olcabasic-0.1.5.tar.gz 38.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for olcabasic 0.1.5
File Interpreter ABI Platform
olcabasic-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 78.8 kB

Release files / olcabasic-0.1.5.tar.gz

Download URL olcabasic-0.1.5.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ed29ce000989f5bff24b4511d4c59883cb40f8f001b41c6e6a22242fa2dd80b4
BLAKE2b-256 checksum
How to use checksums
43b04d44cbff79a216dd49c464fbf23cbdfd032b0954d16c6bc4c18ec6831008
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 24, 2026.

Transparency log

Release files / olcabasic-0.1.5-py3-none-any.whl

Download URL olcabasic-0.1.5-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7243c5fbc785b667c5bc35f83295f5f9a3f920e2336dc9cb44a8643a1a2112b
BLAKE2b-256 checksum
How to use checksums
7bb5f871868a8e1ba6ee046437531011b0649e4d9c2c46a7d10ff6c17d0728d0
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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