init()

Create the project structure at path.

Usage

Source

init(
    path=".",
    *,
    force=False,
)

Creates raw/, recipes/, work/ and useful-views/, a starter README.md, an AGENTS.md with instructions for AI coding assistants, a .gitignore that keeps raw data, work files and views out of git, and an empty datapackage.json and catalog. Safe to run twice: it never overwrites a file. If a .gitignore is already there, it warns when raw data, work files or views would not be ignored (asking git, inside a git repository), naming the lines to add.

Parameters

path: str | Path = "."

The project folder. Created, with its parents, if missing.

force: bool = False
Create the project even in your home folder or at the top of a drive, which init otherwise refuses: every folder below would then be inside the project.

Returns

Path
The project folder, as an absolute path.

Raises

ProjectError
path is inside another project, is a file, holds a datapackage.json that useful-views did not write, or is your home folder or the top of a drive (without force).