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 🚧
Function reference
Core functions
Core functions that support the creation and management of data packages and data resources.
Data package functions
Functions to work with and manage data packages, but not the data resources within them.
create_package_properties | Creates a new datapackage.json file with properties for a new package. |
edit_package_properties | Edits the properties of an existing package. |
Data resource functions
Functions to work with and manage data resources found within a data package.
create_resource_properties | Creates a valid properties object for the specified resource. |
create_resource_structure | Creates the directory structure of a new resource. |
write_resource_properties | Writes the specified resource properties to the datapackage.json file. |
Property dataclasses
Dataclasses that support creating correct data package properties.
ConstraintsProperties | A dataclass that expresses constraints for validating field values. |
ContributorProperties | The people or organizations who contributed to this data package. |
FieldProperties | A field in a table schema. |
LicenseProperties | The license(s) under which the package or resource is provided. |
MissingValueProperties | Values that, when encountered in the source, should be considered as not present. |
PackageProperties | Properties for a data package. |
ReferenceProperties | The destination part of a foreign key. |
ResourceProperties | A data resource. |
SourceProperties | The raw sources for this data package. |
TableSchemaForeignKeyProperties | A foreign key in a table schema. |
TableSchemaProperties | A table schema for a data resource. |
Path functions
Functions to support providing the correct file paths to data package and data resource functions.
path_package | Get the path to a specific package in Sprout’s global location. |
path_properties | Gets the absolute path to the specified package’s properties file. |
path_packages | Get the paths for all packages in Sprout’s global location. |
path_resource | Gets the absolute path to the specified resource. |
path_resource_data | Gets the absolute path to the specified resource’s data (i.e., parquet) file. |
path_resource_raw | Gets the absolute path to the specified resource’s raw folder. |
path_resource_raw_files | Gets the absolute path to the raw files of the specified resource. |
path_resources | Gets the absolute path to the resources of the specified package. |
path_sprout_global | Gets Sprout’s global path location. |
Helper functions
Functions to support working with data packages and running code within Sprout Core.
example_package_properties | Generate an example package properties object. |