now.datasource.datasource module#

class now.datasource.datasource.DatasourceType[source]#

Bases: now.utils.BetterEnum

DEMO = 'demo'#
CUSTOM_DOCARRAY = 'custom-docarray'#
LOCAL_FILES = 'local-files'#
DATABASE_CONNECTOR = 'db-connector'#
class now.datasource.datasource.Datasource[source]#

Bases: object

abstract property type: now.datasource.datasource.DatasourceType#
Return type

DatasourceType

abstract property modalities: List[now.constants.Modalities]#
Return type

List[Modalities]

abstract get_data(*args, **kwargs)[source]#
Return type

DocumentArray

class now.datasource.datasource.DemoDatasource(id_, display_name, modality_folder)[source]#

Bases: now.datasource.datasource.Datasource

property type: now.datasource.datasource.DatasourceType#
Return type

DatasourceType

property modalities: List[now.constants.Modalities]#
Return type

List[Modalities]

get_data()[source]#
Return type

DocumentArray