appabuild.config.appa_lca#

Module containing all the classes and methods to load and validate Appa LCA configurations.

Classes#

AppaLCAConfig

An Appa LCA configuration, contains information used to set up a Brightway's

DatabaseConfig

Database entry in an Appa LCA configuration.

Module Contents#

class appabuild.config.appa_lca.AppaLCAConfig#

Bases: pydantic.BaseModel

An Appa LCA configuration, contains information used to set up a Brightway’s environment and specify the paths of the background and foreground databases.

Attributes:

project_name: name used by Brightway to initialize the environment. databases: databases to import, only one foreground database is required and ecoinvent database is optional.

static from_yaml(appa_lca_conf_path: str) AppaLCAConfig#

Load an Appa LCA configuration from its yaml file. If the configuration is invalid, raise a ValidationError.

classmethod validate_databases(databases)#

Check that the foreground database is in the databases to import, if not raise a PydanticCustomError of type key_error.

databases: Dict[str, DatabaseConfig]#
project_name: str#
class appabuild.config.appa_lca.DatabaseConfig#

Bases: pydantic.BaseModel

Database entry in an Appa LCA configuration.

Attributes:

name: name of the database. path: root path of the database elements.

classmethod path_exists(path: str)#
name: str#
path: str#