bw2data.database
#
Module Contents#
Functions#
|
A method that returns a database class instance. The default database type is SingleFileDatabase. JSONDatabase stores each process dataset in indented JSON in a separate file. Database types are specified in databases[database_name]['backend']. |
Attributes#
- bw2data.database.DatabaseChooser(name, backend=None)[source]#
A method that returns a database class instance. The default database type is SingleFileDatabase. JSONDatabase stores each process dataset in indented JSON in a separate file. Database types are specified in databases[database_name][‘backend’].
New database types can be registered with the config object:
config.backends['backend type string'] = MyNewBackendClass
Warning
Registering new backends must be done each time you start the Python interpreter.
To test whether an object is a database subclass, do:
from bw2data.backends import LCIBackend isinstance(my_database, LCIBackend)