Metadata-Version: 2.4
Name: olca-ipc
Version: 2.6.2
Summary: A package for calling openLCA functions from Python.
Project-URL: Homepage, https://github.com/GreenDelta/olca-ipc.py
Project-URL: Bug Tracker, https://github.com/GreenDelta/olca-ipc.py/issues
Keywords: openLCA,life cycle assessment,LCA
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: olca-schema>=2.6.2
Requires-Dist: requests>=2.33.1
Provides-Extra: test
Requires-Dist: pytest>=9.0; extra == "test"
Provides-Extra: packaging
Requires-Dist: build>=1.4; extra == "packaging"
Requires-Dist: twine>=6.2; extra == "packaging"
Dynamic: license-file

# olca-ipc

`olca-ipc` is a Python package for inter-process communication (IPC) with
openLCA. With this, it is possible to call functions of openLCA and processing
their results in Python. It implements the unified IPC protocol of openLCA for
JSON-RPC and REST APIs. The documentation of these protocols and examples can be
found here:

__[https://greendelta.github.io/openLCA-ApiDoc](https://greendelta.github.io/openLCA-ApiDoc)__.

This package is available on [pypi.org](https://pypi.org/project/olca-ipc) and
can be installed / updated like this:

```bash
pip install -U olca-ipc
```

If you just want to read and write data for openLCA 2, you can also use the
[olca-schema package](https://pypi.org/project/olca-schema/) directly, which is
a dependency of `olca-ipc`.


## Tests and packaging

If you want to run the test suite, make sure you have a server running and
configured in [tests/config.py](./tests/config.py). Then you can run the tests
with `pytest`, e.g. with `uv`:

```bash
cd olca-ipc.py
# create a virtual environment
uv venv [-p 3.12]
# install the test dependencies
uv sync --extra test
# run all tests
uv run pytest tests
```

Build and validate a release package with:

```bash
# install the packaging dependencies
uv sync --extra packaging
# build the source and wheel distributions
uv run python -m build
# validate the generated artifacts
uv run twine check dist/*
```
