A project is a separate workspace which has its own data and preferences. Project management is is done through the projects
object:
from brightway2 import *
List existing projects:
list(projects)
Switching projects is the same as adding a project - it will be created if it doesn't exist already:
projects.set_current("foo")
list(projects)
A new project starts out empty - add default biosphere flows and impact assessment methods if you want:
list(databases)
bw2setup()
list(databases)
Each project is a directory:
projects.dir
We can add subdirectories if needed (e.g. for custom data):
projects.request_directory("my-new-directory")
Finally, you can copy projects. Note that a copy is made of your current project, so be sure to switch to the project you want to copy first:
projects.copy_project("my copy")
The current project is switched to the copy:
projects.current