Dagster DG Core
dagster-dg-core is a foundational library within the Dagster ecosystem, primarily powering the `dg` command-line interface (CLI). It enables local development, project scaffolding, deployment to environments like Dagster Cloud, and programmatic interaction with Dagster entities such as assets, runs, and jobs via CLI commands. As of version 1.13.0, it supports advanced features including AI-assisted development tools and enhanced asset management capabilities. Dagster maintains a frequent release cadence, often issuing weekly or bi-weekly patches and regular minor version updates across its libraries.
Warnings
- gotcha All Dagster ecosystem packages (e.g., `dagster`, `dagster-webserver`, `dagster-dg-core`, and other `dagster-*` libraries) should always be installed at the exact same version number to ensure compatibility and avoid runtime errors. Mismatched versions are a very common source of issues.
- breaking As of Dagster core v1.12.18 (and corresponding `dagster-dg-core` versions), the `psycopg2-binary` package is no longer a transitive dependency of `dagster-postgres`. If your project relies on `dagster-postgres` (or integrations that use it) and implicitly used `psycopg2-binary`, you must now explicitly add `pip install psycopg2-binary` to your project dependencies.
- gotcha Older versions of `dagster-dg-core` (e.g., v1.12.3) might have an over-conservative dependency pin on `typer < 0.17`. This can lead to conflicts with other Python packages that require a newer `typer` version (e.g., `>= 0.20.1`).
Install
-
pip install dagster dagster-dg-core
Imports
- cli
from dagster_dg_core import cli
Quickstart
pip install dagster dagster-dg-core mkdir my-dagster-project cd my-dagster-project dg new --name my_first_project --preset minimal # Navigate into the newly created project directory cd my_first_project # Start the Dagster development server and UI dg dev