bw2data.serialization#
Attributes#
Classes#
Subclass of |
|
Subclass of |
|
Base class for dictionary that can be serialized to or unserialized from disk. Uses JSON as its storage format. Has most of the methods of a dictionary. |
Module Contents#
- class bw2data.serialization.CompoundJSONDict(dirpath=None)[source]#
Bases:
SerializedDict
Subclass of
SerializedDict
that allows tuples as dictionary keys (not allowed in JSON).
- class bw2data.serialization.PickledDict(dirpath=None)[source]#
Bases:
SerializedDict
Subclass of
SerializedDict
that uses the pickle format instead of JSON.
- class bw2data.serialization.SerializedDict(dirpath=None)[source]#
Bases:
collections.abc.MutableMapping
Base class for dictionary that can be serialized to or unserialized from disk. Uses JSON as its storage format. Has most of the methods of a dictionary.
Upon instantiation, the serialized dictionary is read from disk.
- pack(data)[source]#
Transform the data, if necessary. Needed because JSON must have strings as dictionary keys.