description = "Added from the olca-ipc python API." # in openLCA, conversion factors between different # properties/quantities of a flow are stored in # FlowPropertyFactor objects. FlowProperty, 'Mass' ) # create a flow that has 'Mass' as reference flow property steel = olca. Client ( 8080 ) # find the flow property 'Mass' from the database mass = client. The following example shows how toĬreate a new flow and link it to an existing flow property with the name Mass: import olca import uuid client = olca. The olca.Client class provides methods like get, find, insert, (Note that we convert camelCase names like calculationType of attributes andįunctions to lower_case_names_with_underscores like calculation_type when
You can create, updateĪnd link data models as defined in the openLCA schema (e.g. With the type annotations you should get goodĮditor support (type checks and IntelliSense).
The olca package contains a class model with type annotations for theįor exchanging data with openLCA.
Without input checks, error handling, code structuring, and all the things you The followingĮxamples show some typical uses cases (note that these are just examples Client ( 8080 )Īn instance of the olca.Client class is then a convenient entry point forĬalling functions of openLCA and processing their results. 8080, to which you connect from an IPC client: import olca client = olca. You can do this via the user interface in openLCA under In order to communicate with openLCA, you first need to start an openLCA IPC
If you want to use the current development branch you canĪnd install it from the extracted folder: # optionally, first uninstall it Use it, you can just install (and uninstall) it with pip: pip install -U olca-ipc The current stable version of olca-ipc is available via the IPC server via instances of these classes. The openLCA data exchange format and an API for communicating with an openLCA
The olca-ipc package provides a class based implementation of The openLCA IPC protocol is based on the openLCA data exchange format which is Python (Cpython v3.9+) so that it is possible to use openLCA as a data storageĪnd calculation engine and combine it with the libraries from the Python Package provides a convenience API for using this IPC protocol from standard In openLCA and processing their results outside of openLCA. With this, it is possible to call functions Pip install -U provides an implementation If you want to use the latest development version, just install The aim is to document and improve the overall environmental profile of the product.Not all features and bug-fixes are currently available on the version LCA thus assesses cumulative potential environmental impacts. For instance, in the case of a manufactured product, environmental impacts are assessed from raw material extraction and processing (cradle), through the product's manufacture, distribution and use, to the recycling or final disposal of the materials composing it (grave).Īn LCA study involves a thorough inventory of the energy and materials that are required across the industry value chain of the product, process or service, and calculates the corresponding emissions to the environment. Life cycle assessment (LCA, also known as life-cycle analysis) is a methodology for assessing environmental impacts associated with all the stages of the life-cycle of a commercial product, process, or service.