Skip to content

Schema#

lit.sdk.data.schema #

This module provides classes and functions for managing schemas.

Schema #

Represents the configuration for a model and contains information required for compiling the model.

name = name instance-attribute #

The name of the schema.

path = Path('/data') / self.team / 'schemas' / f'{self.name}.json' instance-attribute #

The path to the JSON representation of the canvas on disk.

team = team instance-attribute #

The name of the team.

__init__(team, name) #

Initializes a new instance of Schema.

Parameters:

Name Type Description Default
team str

The team which owns the Schema.

required
name str

The name of the Schema.

required

build() #

Starts a build process in a new screen session.

remove() #

Permanently removes a schema.

get_schemas(team) #

Get the saved schemas for a given team.

Parameters:

Name Type Description Default
team str

The name of the team.

required

Returns:

Type Description
list[Schema]

A list of schema objects.

Examples:

>>> schemas = get_schemas('contoso')
>>> schemas[0].path
/data/contoso/schemas/demo.json