🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧
A simple format to describe and package a single data resource such as an individual table or file. The essence of a data resource is a locator for the data it describes. A range of other properties can be declared to provide a richer set of metadata.
Creates a dataclass object with all the necessary properties for a resource, which would be given in the resources field of a PackageProperties dataclass.
Attributes
name:str | None
A simple name or identifier to be used for this resource. Should consist only of lowercase English alphanumeric characters plus characters in .-_.
path:str | None
A path pointing to the data for this resource.
type:Literal['table'] | None
Specifies the type of the resource.
title:str | None
A human-readable title.
description:str | None
A text description. Markdown is encouraged.
sources:list[SourceProperties] | None
The raw sources for this resource.
licenses:list[LicenseProperties] | None
The license(s) under which the resource is published.
format:str | None
The file format of this resource. Expected to be the standard file extension.
mediatype:str | None
The media type of this resource. Can be any valid media type listed with IANA.
encoding:str | None
The file encoding of this resource.
bytes:int | None
The size of this resource in bytes.
hash:str | None
The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.
dialect:TableDialectProperties | None
The tabular dialect of the resource data.
schema:TableSchemaProperties | None
A table schema for the resource data, compliant with the table schema specification.
Examples
import seedcase_sprout.core as spprint(sp.ResourceProperties())print(sp.ResourceProperties(name="Blood samples", path="data.csv"))