from brightway2 import *
import global_variables as gv

def f_calc_lcia(activity, method=gv.CC_method):
    lca = LCA({activity: 1}, method)  # {:1} to convert activity to functional unit
    lca.lci()
    lca.lcia()
    return lca.score

def f_return_amount_of_parameter(name_par, db_parameters):
    for parameter in db_parameters:
        if parameter.name == name_par:
            return parameter.amount