bw2data.serialization
#
Module Contents#
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. |
Attributes#
- 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.
- property list[source]#
List the keys of the dictionary. This is a property, and does not need to be called.
- pack(data)[source]#
Transform the data, if necessary. Needed because JSON must have strings as dictionary keys.