Dagster Webserver
Dagster Webserver provides the web-based user interface (UI) for Dagster, a Python library for building data applications. It allows users to view and interact with Dagster objects such as assets, jobs, schedules, and launches runs. The project is actively maintained with frequent minor and patch releases, often on a weekly or bi-weekly basis. The current version is 1.12.22.
Warnings
- breaking Dagster has dropped support for Python 3.9, which has reached its end-of-life. The minimum supported Python version is now 3.10. Projects on older Python versions will need to upgrade.
- breaking The core `dagster` package (and by extension, `dagster-webserver`) now requires `pydantic>=2`. This may cause conflicts with existing environments or projects that depend on an older `pydantic` version.
- gotcha `psycopg2-binary` has been removed as a direct dependency from `dagster-postgres` as of `dagster` 1.12.18. If your project uses `dagster-postgres` and implicitly relied on `psycopg2-binary` being installed, you will now need to explicitly add `psycopg2-binary` (or `psycopg2`) to your project's dependencies. Note that `psycopg2-binary` is generally discouraged for production environments due to its pre-compiled nature.
- gotcha A bug in `dagster-webserver` versions prior to 1.12.17 caused the Dagster UI to fail to load due to issues with the built webapp inclusion. Users on these specific versions would experience a non-functional UI.
- deprecated The `dagster dev` command is being superseded by `dg dev` for starting a local development deployment (webserver and daemon). While `dagster dev` still works, `dg dev` is the recommended new CLI command.
Install
-
pip install dagster-webserver
Quickstart
# 1. Create a directory for your project, e.g., `my_dagster_project`
# 2. Inside `my_dagster_project`, create a file named `definitions.py`:
# definitions.py
from dagster import Definitions, asset
@asset
def hello_world():
"""A simple asset that prints a message."""
print("Hello, Dagster!")
defs = Definitions(assets=[hello_world])
# 3. From the `my_dagster_project` directory, run the Dagster webserver:
# (Ensure you have `dagster-webserver` installed in your environment)
# The `dagster dev` command will launch both the webserver and the daemon.
# It will serve the Dagster UI at http://localhost:3000.
# You can also specify the file with -f definitions.py
# If you create a workspace.yaml file, you can run 'dagster dev' without arguments.
# For this quickstart, running `dagster dev -f definitions.py` in the project root is sufficient.
# To run in terminal:
# cd my_dagster_project
# dagster dev -f definitions.py