APIClasses
cognite.pygen._core.models.api_classes
This module contains classes representing the API classes generated by the SDK generator.
APIClass
dataclass
This is the base class for all API classes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parent_attribute
|
str
|
The name of the attribute in the client class that this API class is attached. |
required |
name
|
str
|
The name of the API class. |
required |
file_name
|
str
|
The name of the file where the API class is located. |
required |
Source code in cognite/pygen/_core/models/api_classes.py
MultiAPIClass
dataclass
This represents a set of APIs which are generated from a single data model.
The motivation for having this class is the case when you want to create one SDK for multiple data models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sub_apis_by_view_id
|
dict[ViewId, APIClass]
|
A dictionary mapping view IDs to the corresponding API classes. |
required |
parent_attribute
|
str
|
The name of the attribute in the client class that this API class is attached |
required |
name
|
str
|
The name of the API class. |
required |
model
|
DataModel[View]
|
The data model that the APIs are generated from. |
required |