REGISTER NOW: Brightway Spring School! 🇨🇦 Québec City (Canada) 🗓️ 20.-24. May 2024

bw2data.meta#

Module Contents#

Classes#

CalculationSetups

A dictionary for calculation setups.

Databases

A dictionary for database metadata. This class includes methods to manage database versions. File data is saved in databases.json.

DynamicCalculationSetups

A dictionary for Dynamic calculation setups.

GeoMapping

A dictionary that maps location codes to integers. Needed because parameter arrays have integer geo fields.

Methods

A dictionary for method metadata. File data is saved in methods.json.

NormalizationMeta

A dictionary for normalization metadata. File data is saved in methods.json.

Preferences

A dictionary of project-specific preferences.

WeightingMeta

A dictionary for weighting metadata. File data is saved in methods.json.

Attributes#

calculation_setups

databases

dynamic_calculation_setups

geomapping

methods

normalizations

preferences

weightings

class bw2data.meta.CalculationSetups(dirpath=None)[source]#

Bases: bw2data.serialization.PickledDict

Inheritance diagram of bw2data.meta.CalculationSetups

A dictionary for calculation setups.

Keys: * inv: List of functional units, e.g. [{(key): amount}, {(key): amount}] * ia: List of LCIA methods, e.g. [(method), (method)].

filename = 'setups.pickle'[source]#
class bw2data.meta.Databases(dirpath=None)[source]#

Bases: bw2data.serialization.SerializedDict

Inheritance diagram of bw2data.meta.Databases

A dictionary for database metadata. This class includes methods to manage database versions. File data is saved in databases.json.

filename = 'databases.json'[source]#
clean()[source]#
increment_version(database, number=None)[source]#

Increment the database version. Returns the new version.

set_dirty(database)[source]#
set_modified(database)[source]#
version(database)[source]#

Return the database version

class bw2data.meta.DynamicCalculationSetups(dirpath=None)[source]#

Bases: bw2data.serialization.PickledDict

Inheritance diagram of bw2data.meta.DynamicCalculationSetups

A dictionary for Dynamic calculation setups.

Keys: * inv: List of functional units, e.g. [{(key): amount}, {(key): amount}] * ia: Dictionary of orst case LCIA method and the relative dynamic LCIA method, e.g. `` [{dLCIA_method_1_worstcase:dLCIA_method_1 , dLCIA_method_2_worstcase:dLCIA_method_2}]``.

filename = 'dynamicsetups.pickle'[source]#
class bw2data.meta.GeoMapping(*args, **kwargs)[source]#

Bases: bw2data.serialization.PickledDict

Inheritance diagram of bw2data.meta.GeoMapping

A dictionary that maps location codes to integers. Needed because parameter arrays have integer geo fields.

File data is stored in geomapping.pickle.

This dictionary does not support setting items directly; instead, use the add method to add multiple keys.

filename = 'geomapping.pickle'[source]#
add(keys)[source]#

Add a set of keys. These keys can already be in the mapping; only new keys will be added.

Args:
  • keys (list): The keys to add.

delete(keys)[source]#

Delete a set of keys.

Args:

keys (list): The keys to delete.

class bw2data.meta.Methods(dirpath=None)[source]#

Bases: bw2data.serialization.CompoundJSONDict

Inheritance diagram of bw2data.meta.Methods

A dictionary for method metadata. File data is saved in methods.json.

filename = 'methods.json'[source]#
class bw2data.meta.NormalizationMeta(dirpath=None)[source]#

Bases: Methods

Inheritance diagram of bw2data.meta.NormalizationMeta

A dictionary for normalization metadata. File data is saved in methods.json.

filename = 'normalizations.json'[source]#
class bw2data.meta.Preferences(*args, **kwargs)[source]#

Bases: bw2data.serialization.PickledDict

Inheritance diagram of bw2data.meta.Preferences

A dictionary of project-specific preferences.

filename = 'preferences.pickle'[source]#
class bw2data.meta.WeightingMeta(dirpath=None)[source]#

Bases: Methods

Inheritance diagram of bw2data.meta.WeightingMeta

A dictionary for weighting metadata. File data is saved in methods.json.

filename = 'weightings.json'[source]#
bw2data.meta.calculation_setups[source]#
bw2data.meta.databases[source]#
bw2data.meta.dynamic_calculation_setups[source]#
bw2data.meta.geomapping[source]#
bw2data.meta.methods[source]#
bw2data.meta.normalizations[source]#
bw2data.meta.preferences[source]#
bw2data.meta.weightings[source]#