init()
Create the project structure at path.
Usage
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-
pathis inside another project, is a file, holds adatapackage.jsonthat useful-views did not write, or is your home folder or the top of a drive (withoutforce).