Skip to main content

Creating a project with components

info

This feature is still in development and might change in patch releases. It’s not production ready, and the documentation may also evolve. Stay tuned for updates.

Prerequisites

Before creating a project with components, you must follow the steps to install uv and dg.

After installing dependencies, you can scaffold a components-ready project. In the example below, we scaffold a project called jaffle-platform:

dg scaffold project jaffle-platform
Creating a Dagster project at /.../jaffle-platform.
Scaffolded files for Dagster project at /.../jaffle-platform.
...

This command builds a project and initializes a new Python virtual environment inside of it. When using dg's default environment management behavior, you won't need to worry about activating this virtual environment yourself.

Project structure

Running dg scaffold project <project-name> creates a fairly standard Python project structure:

cd jaffle-platform && tree
.
├── jaffle_platform
│   ├── __init__.py
│   ├── components
│   ├── definitions.py
│   └── lib
│   └── __init__.py
├── jaffle_platform.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   ├── entry_points.txt
│   ├── requires.txt
│   └── top_level.txt
├── jaffle_platform_tests
│   └── __init__.py
├── pyproject.toml
└── uv.lock

6 directories, 12 files

The following files and directories are included:

  • A Python package jaffle_platform-- the name is an underscored inflection of the project root directory (jaffle_platform).
  • An (empty) jaffle_platform_tests test package.
  • A uv.lock file.
  • A pyproject.toml file.
note

For more information about the sections and settings in pyproject.toml, see "pyproject.toml settings".

Next steps

After scaffolding your project with components, you can add more components to complete your pipeline.