Creating a project with components
This feature is considered in a preview stage and is under active development. There may be API changes and feature gaps. Please go to the #dg-components channel in our Slack to report issues or give feedback.
After installing dependencies, you can scaffold a components-ready project. In the example below, we scaffold a project called jaffle-platform
:
dg init 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.
To create and manage multiple components-ready projects, see "Managing multiple projects with dg". Each project will have its own uv
-managed Python environment.
Project structure
Running dg scaffold project <project-name>
creates a fairly standard Python project structure:
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
The following files and directories are included:
- A Python package
jaffle_platform
located insrc/jaffle_platform
-- the name is an underscored inflection of the project root directory (jaffle-platform
). - An (empty)
tests
package. - A
uv.lock
file. - A
pyproject.toml
file.
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.