Warning

🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧

core.create_package_structure

core.create_package_structure

Functions

Name Description
create_package_structure Sets up the folder structure for a new package.

create_package_structure

core.create_package_structure.create_package_structure(path)

Sets up the folder structure for a new package.

This is the first function to use to create a new data package. It assigns a package ID and then creates a package folder and all the necessary files for a package (excluding the resources), outputting the file paths for the created files.

Parameters

path : Path

The path to the folder containing the packages. Use path_packages() to provide the correct path location.

Returns

: list[Path]

A list of paths to the two created files, the datapackage.json and the README.md, as well as one created resources/ folder.

Raises

: NotADirectoryError

If the directory in the path doesn’t exist.

: FileNotFoundError

If a file could not be created.

: TypeError

If datapackage.json could not be created.