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
Links
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.2.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 | |
|---|---|---|---|
| olcabasic-0.2.0.tar.gz | 45.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| olcabasic-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.2 kB
Release files / olcabasic-0.2.0.tar.gz
| Download URL | olcabasic-0.2.0.tar.gz |
|---|---|
| Size | 45.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6261b9fa60a671f451785166dde701f77265597a8de20b6c1d0c44f5ceab70d
|
|
BLAKE2b-256 checksum How to use checksums |
89d8701fa1ce64b10357b8fcd7d01235e8b5ab36285d625ff888a709ae0a995e
|
| 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 25, 2026.
Transparency logRelease files / olcabasic-0.2.0-py3-none-any.whl
| Download URL | olcabasic-0.2.0-py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59cea2ac92f11c849352c0bc1e824be3e18d56fe9c575b8db8bf2e68df6095c9
|
|
BLAKE2b-256 checksum How to use checksums |
745268375d01ce69c16aec8c5c1ffd59bbbb10b61e4431118859f2f42ab1acf3
|
| 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 25, 2026.
Transparency log