Adapter#
lit.sdk.data.adapter
#
This module loads data adapters using either a JSON configuration or a file path to a schema.
load_adapter(team, name, options=None)
#
Loads an adapter by its JSON configuration
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team
|
str
|
The team that the adapter belongs to. |
required |
name
|
str
|
The name of the adapter. |
required |
options
|
dict | None
|
An optional dictionary of adapter-specific options. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
BaseAdapter
|
The loaded adapter instance. |
Examples:
load_adapter_by_project(team, name)
#
Loads an adapter by its project name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team
|
str
|
The team that the adapter belongs to. |
required |
name
|
str
|
The name of the project. |
required |
Returns:
| Type | Description |
|---|---|
BaseAdapter
|
The loaded adapter instance. |
Examples:
load_adapter_by_schema(team, name)
#
Loads an adapter by its schema file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team
|
str
|
The team that the adapter belongs to. |
required |
name
|
str
|
The name of the schema. |
required |
Returns:
| Type | Description |
|---|---|
BaseAdapter
|
The loaded adapter instance. |
Examples: