PackageProperties

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.PackageProperties(
    self,
    name: str | None = None,
    id: str | None = None,
    title: str | None = None,
    description: str | None = None,
    homepage: str | None = None,
    version: str | None = None,
    created: str | None = None,
    contributors: list[ContributorProperties] | None = None,
    keywords: list[str] | None = None,
    image: str | None = None,
    licenses: list[LicenseProperties] | None = None,
    resources: list[ResourceProperties] | None = None,
    sources: list[SourceProperties] | None = None,
)

Properties for a data package.

A simple container format for describing a coherent collection of data in a single “package”. It provides the basis for convenient delivery, installation and management of datasets.

Creates a dataclass object with all the necessary properties for the package.

Attributes

name : str | None

A simple name or identifier to be used for this package. Should consist only of lowercase English alphanumeric characters plus characters in .-_.

id : str | None

The unique identifier of this package.

title : str | None

A human-readable title.

description : str | None

A text description. Markdown is encouraged.

homepage : str | None

The home on the web that is related to this package.

version : str | None

A version string identifying the version of this package.

created : str | None

The datetime on which this package was created.

contributors : list[ContributorProperties] | None

The people or organizations who contributed to this package.

keywords : list[str] | None

A list of keywords that describe this package.

image : str | None

An image to represent this package.

licenses : list[LicenseProperties] | None

The license(s) under which this package is published.

resources : list[ResourceProperties] | None

Specifies the data resources in this data package, each compliant with the data resource specification.

sources : list[SourceProperties] | None

The raw sources for this data package.

Examples

import seedcase_sprout.core as sp
print(sp.PackageProperties())
print(sp.PackageProperties(name="diabetes-cohort", title="Diabetes Cohort"))
print(sp.PackageProperties(licenses=[sp.LicenseProperties(name="ODC-BY-1.0")]))

# To allow multiline strings, use dedent.
from textwrap import dedent
print(sp.PackageProperties(
    title="Birds of North America",
    description=dedent('''
        # Markdown header

        A dataset of bird sightings. With some **bolding**.
        '''
    )
))
PackageProperties(name=None, id=None, title=None, description=None, homepage=None, version=None, created=None, contributors=None, keywords=None, image=None, licenses=None, resources=None, sources=None)
PackageProperties(name='diabetes-cohort', id=None, title='Diabetes Cohort', description=None, homepage=None, version=None, created=None, contributors=None, keywords=None, image=None, licenses=None, resources=None, sources=None)
PackageProperties(name=None, id=None, title=None, description=None, homepage=None, version=None, created=None, contributors=None, keywords=None, image=None, licenses=[LicenseProperties(name='ODC-BY-1.0', path=None, title=None)], resources=None, sources=None)
PackageProperties(name=None, id=None, title='Birds of North America', description='\n# Markdown header\n\nA dataset of bird sightings. With some **bolding**.\n', homepage=None, version=None, created=None, contributors=None, keywords=None, image=None, licenses=None, resources=None, sources=None)

Methods

Name Description
default Creates a PackageProperties dataclass with default values.

default

core.PackageProperties.default()

Creates a PackageProperties dataclass with default values.

Returns

Self

A PackageProperties dataclass with default values.