Creating a project with dg
info
dg and Dagster Components are under active development. You may encounter feature gaps, and the APIs may change. To report issues or give feedback, please join the #dg-components channel in the Dagster Community Slack.
dg allows you to create a special type of Python package, called a project, that defines a Dagster code location.
note
Dagster projects created with dg are compatible with Dagster Components. For more information, see the Dagster Components documentation.
Prerequisites
Before creating a project with dg, you must install dg.
Creating a project
- uv
- pip
dg scaffold project my-project
dg scaffold project my-project
Project structure
The dg scaffold project command creates a directory with a standard Python package structure with some additions:
- uv
- pip
tree
.
├── pyproject.toml
├── src
│ └── jaffle_platform
│ ├── __init__.py
│ ├── definitions.py
│ ├── defs
│ │ └── __init__.py
│ └── lib
│ └── __init__.py
├── tests
│ └── __init__.py
└── uv.lock
6 directories, 7 files
tree
.
├── pyproject.toml
├── src
│ └── jaffle_platform
│ ├── __init__.py
│ ├── definitions.py
│ ├── defs
│ │ └── __init__.py
│ └── lib
│ └── __init__.py