xtrace_sdk.connectors.local_disk_connector

Classes

LocalDiskConnector

This is the base class for a Connector.

Module Contents

class xtrace_sdk.connectors.local_disk_connector.LocalDiskConnector(directory)

Bases: xtrace_sdk.connectors.base.ConnectorBase

This is the base class for a Connector. It provides an interface for connecting to various data sources.

Parameters:

directory (str)

directory
connect()

Establish a connection to the data source. This method should be implemented by subclasses to handle the specifics of connecting to the data source.

Return type:

None

load_data()

Load data from the specified local disk directory.

Returns:

A list of file paths in the specified directory.

Return type:

list

static load_data_from_file(file_path)

Load data from a specific file in the local disk directory.

Parameters:

file_path (str) – The path of the file to load data from.

Returns:

A collection of documents loaded from the specified file.

Return type:

DocumentCollection