bw2data.meta#

Attributes#

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.

Module Contents#

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

Bases: bw2data.serialization.PickledDict

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

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

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

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

Bases: bw2data.serialization.PickledDict

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

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.

add(keys)[source]#

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

Parameters:

keys (*) – The keys to add.

delete(keys)[source]#

Delete a set of keys.

Parameters:

*keys* (list) – The keys to delete.

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

Bases: bw2data.serialization.CompoundJSONDict

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

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

A dictionary of project-specific preferences.

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

Bases: Methods

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]#