Function reference
Data package functions
Functions to work with and manage data packages, but not the data resources within them.
| write_file | Write the string to a file at the specified path. |
Data resource functions
Functions to work with and manage data resources found within a data package.
| extract_field_properties | Extract field properties from a Polars DataFrame. |
| join_resource_batches | Join all the batch DataFrames into one. |
| read_resource_batches | Read all batch resource file(s) into a list of DataFrames. |
| write_resource_data | Check and write the resource data into a file. |
| DataResourceError | Error listing issues in a data resource. |
Package property dataclasses
Dataclasses to help create properties at the package level.
| ContributorProperties | The people or organizations who contributed to this data package. |
| LicenseProperties | The license(s) under which the package or resource is provided. |
| SproutProperties | Properties for a data package. |
| SourceProperties | The raw sources for this data package. |
Resource property dataclasses
Dataclasses to help create properties at the resource level.
| ConstraintsProperties | A dataclass that expresses constraints for validating field values. |
| FieldProperties | A field in a table schema. |
| ReferenceProperties | The destination part of a foreign key. |
| ResourceProperties | A data resource. |
| TableSchemaForeignKeyProperties | A foreign key in a table schema. |
| TableSchemaProperties | A table schema for a data resource. |
Property functions
Functions used to work with properties.
| check_data | Checks that the DataFrame matches the requirements in the properties. |
| create_properties_script | Create a properties script with default values. |
| create_resource_properties_script | Create a script using the resource properties template. |
| read_properties | Read in the properties from the datapackage.json file. |
| write_properties | Write the properties to the datapackage.json file. |
Path functions
Functions to support providing the correct file paths to files and folders in a data package for other functions.
| PackagePath | Get the absolute path to a specific file or folder in a data package. |
Helper functions
Functions to support working with data packages and running code within Seedcase Sprout.
| example_package_properties | Generate an example package properties object. |
| example_resource_properties | An example resource properties object. |
| example_resource_properties_all_types | An example resource properties with all Data Package types. |
| example_data | An example Polars data frame. |
| example_data_all_types | An example Polars data frame with all Data Package types. |
| ExamplePackage | A temporary, example data package with optional resources. |