bw_simapro_csv.header
Attributes
Classes
str(object='') -> str |
Functions
|
Read the header section and parse its values. A typical header looks like: |
Module Contents
- class bw_simapro_csv.header.SimaProCSVHeader[source]
Bases:
pydantic.BaseModel- kind: SimaProCSVType[source]
- class bw_simapro_csv.header.SimaProCSVType[source]
Bases:
str,enum.Enumstr(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- bw_simapro_csv.header.parse_header(data: List[str])[source]
Read the header section and parse its values. A typical header looks like:
{SimaPro 8.2.0.0} {processes} {Date: 10/12/2016} {Time: 10:54:47 PM}
Sometimes these lines can be quoted:
“{Related objects (system descriptions, substances, units, etc.): Yes}”
The generic pattern is:
SimaPro version File export type Key: value dictionary Optional library list
We parse this into a header dictionary, doing type conversion when necessary.