{"id":27740,"library":"fireworks","title":"FireWorks","description":"FireWorks is a workflow software for managing high-throughput calculations, particularly in materials science. Current version: 2.1.3. It uses MongoDB as a backend. Release cadence is irregular with occasional minor updates.","status":"active","version":"2.1.3","language":"python","source_language":"en","source_url":"https://github.com/materialsproject/fireworks","tags":["workflow","high-throughput","materials-science","mongodb","fireworks"],"install":[{"cmd":"pip install fireworks","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for MongoDB backend (FireWorks stores workflows in MongoDB).","package":"pymongo","optional":false},{"reason":"Used for serialization and utility functions.","package":"monty","optional":false},{"reason":"Utility library for data manipulation.","package":"pydash","optional":true}],"imports":[{"note":"In versions <=1.9, LaunchPad was under fireworks.core. In v2.0+, it's directly under fireworks.","wrong":"from fireworks.core import LaunchPad","symbol":"LaunchPad","correct":"from fireworks import LaunchPad"},{"note":"Workflow is now directly importable from fireworks (v2+).","wrong":"from fireworks.core.firework import Workflow","symbol":"Workflow","correct":"from fireworks import Workflow"},{"note":"Firework is now directly importable from fireworks (v2+).","wrong":"from fireworks.core.firework import Firework","symbol":"Firework","correct":"from fireworks import Firework"},{"note":"PyTask moved to top-level in v2+.","wrong":"from fireworks.core.firetasks import PyTask","symbol":"PyTask","correct":"from fireworks import PyTask"}],"quickstart":{"code":"from fireworks import LaunchPad, Workflow, Firework, PyTask\n\n# Initialize launchpad (requires MongoDB running)\nlaunchpad = LaunchPad(name='test')\n\n# Define tasks\ntask1 = PyTask(func='print', args=[\"Hello from FireWorks\"])\ntask2 = PyTask(func='print', args=[\"Task 2\"])\n\n# Create fireworks\nfw1 = Firework(tasks=[task1], name='hello_task')\nfw2 = Firework(tasks=[task2], name='task2')\n\n# Create workflow\nwf = Workflow([fw1, fw2], name='my_workflow')\n\n# Add workflow to launchpad\nlaunchpad.add_wf(wf)\nprint('Workflow added successfully. Run with: lpad run')\n","lang":"python","description":"Minimal example: define tasks, fireworks, and a workflow, then add to the launchpad."},"warnings":[{"fix":"Update imports: `from fireworks import LaunchPad, Workflow, Firework, PyTask` instead of old paths.","message":"In v2.0+, the import paths changed dramatically. Submodules like fireworks.core, fireworks.firetasks, and fireworks.utilities moved or merged. Check all imports if upgrading from v1.x.","severity":"breaking","affected_versions":">=1.0, <2.0"},{"fix":"Explicitly pass `name='fireworks'` to LaunchPad if you relied on the old default.","message":"The default MongoDB connection changed. In v2.0+, the LaunchPad defaults to host='localhost' and port=27017, but the database name is no longer 'fireworks' by default; it uses the name parameter. Previously, it was 'fireworks' implicitly.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Start MongoDB service before using FireWorks: `mongod --dbpath /data/db &` or via system service.","message":"FireWorks requires MongoDB running locally (or accessible). Many new users forget to start MongoDB, leading to connection errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `FWAction` with `ScriptTask` or appropriate built-in tasks.","message":"The `FWAction` and `FWData` classes are deprecated in v2.1+. Use `FileWriteTask` and `ScriptTask` instead.","severity":"deprecated","affected_versions":">=2.1.0"},{"fix":"Ensure the function is defined in a module accessible via Python's import system. Use dotted strings like `'mymodule.myfunc'`.","message":"When using `PyTask`, the `func` argument must be a string that can be imported from the module where the function lives. If the function is not importable, tasks will fail at runtime.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Start MongoDB: `mongod --dbpath /data/db &` (or use systemd). Check host/port defaults: LaunchPad uses localhost:27017.","cause":"MongoDB is not running or not accessible at the configured host/port.","error":"pymongo.errors.ServerSelectionTimeoutError: No servers found yet"},{"fix":"Use `from fireworks import LaunchPad` (v2+) or `from fireworks.core import LaunchPad` (v1.x). Check your version.","cause":"Using old import path. In older versions, LaunchPad was in fireworks.core.","error":"ImportError: cannot import name 'LaunchPad' from 'fireworks'"},{"fix":"Replace `FWData` with `FileWriteTask` or `ScriptTask`. See migration guide.","cause":"Using deprecated `FWData` class (removed in v2.1+).","error":"fireworks.core.firework.FWData object has no attribute 'to_dict'"},{"cause":"Passing host/port directly to LaunchPad; in older versions, the constructor signature was different.","error":"TypeError: __init__() got an unexpected keyword argument 'host'","fixed":"Use keyword arguments: `LaunchPad(host='...', port=..., name='...')`. In v2+, the LaunchPad accepts host/port, but check version."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}