carb.datasource

This module contains bindings to C++ carb::datasource interface.

class carb.datasource.ChangeAction(self: carb.datasource._datasource.ChangeAction, arg0: int)None

Bases: pybind11_builtins.pybind11_object

ChangeAction.

Members:

CREATED

DELETED

MODIFIED

CONNECTION_LOST

CONNECTION_LOST = ChangeAction.CONNECTION_LOST
CREATED = ChangeAction.CREATED
DELETED = ChangeAction.DELETED
MODIFIED = ChangeAction.MODIFIED
property name

handle) -> str

Type

(self

class carb.datasource.Connection

Bases: pybind11_builtins.pybind11_object

class carb.datasource.ConnectionDesc(self: carb.datasource._datasource.ConnectionDesc)None

Bases: pybind11_builtins.pybind11_object

Descriptor for a connection.

property disable_cache
property password
property url
property username
class carb.datasource.ConnectionEventType(self: carb.datasource._datasource.ConnectionEventType, arg0: int)None

Bases: pybind11_builtins.pybind11_object

Connection event results.

Members:

CONNECTED

DISCONNECTED

FAILED

INTERUPTED

CONNECTED = ConnectionEventType.CONNECTED
DISCONNECTED = ConnectionEventType.DISCONNECTED
FAILED = ConnectionEventType.FAILED
INTERUPTED = ConnectionEventType.INTERUPTED
property name

handle) -> str

Type

(self

class carb.datasource.IDataSource

Bases: pybind11_builtins.pybind11_object

connect(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.ConnectionDesc, arg1: Callable[[carb.datasource._datasource.Connection, carb.datasource._datasource.ConnectionEventType], None])None
create_data(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: bytes, arg3: Callable[[carb.datasource._datasource.Response, str, str], None])int
delete_data(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: Callable[[carb.datasource._datasource.Response, str], None])int
disconnect(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection)None
get_connection_id(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection)int
get_connection_native_handle(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection) → capsule
get_connection_url(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection)str
get_connection_username(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection)str
get_supported_protocols(self: carb.datasource._datasource.IDataSource)str
is_writable(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: Callable[[carb.datasource._datasource.Response, str, bool], None])int
list_data(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: bool, arg3: Callable[[carb.datasource._datasource.Response, carb.datasource._datasource.ItemInfo], bool], arg4: Callable[[carb.datasource._datasource.Response, str], None])int
read_data(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: Callable[[carb.datasource._datasource.Response, str, bytes], None])int
read_data_sync(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str)bytes
stop_request(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: int)None
subscribe_to_change_events(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: Callable[[str, carb.datasource._datasource.ChangeAction], None]) → carb._carb.Subscription
write_data(self: carb.datasource._datasource.IDataSource, arg0: carb.datasource._datasource.Connection, arg1: str, arg2: bytes, arg3: str, arg4: Callable[[carb.datasource._datasource.Response, str], None])int
class carb.datasource.ItemInfo(self: carb.datasource._datasource.ItemInfo)None

Bases: pybind11_builtins.pybind11_object

Class holding the list data item information

property created_timestamp
property is_directory
property is_writable
property modified_timestamp
property path
property size
property version
class carb.datasource.Response(self: carb.datasource._datasource.Response, arg0: int)None

Bases: pybind11_builtins.pybind11_object

Response results for data requests.

Members:

OK

ERROR_INVALID_PATH

ERROR_ALREADY_EXISTS

ERROR_INCOMPATIBLE_VERSION

ERROR_TIMEOUT

ERROR_ACCESS

ERROR_UNKNOWN

ERROR_ACCESS = Response.ERROR_ACCESS
ERROR_ALREADY_EXISTS = Response.ERROR_ALREADY_EXISTS
ERROR_INCOMPATIBLE_VERSION = Response.ERROR_INCOMPATIBLE_VERSION
ERROR_INVALID_PATH = Response.ERROR_INVALID_PATH
ERROR_TIMEOUT = Response.ERROR_TIMEOUT
ERROR_UNKNOWN = Response.ERROR_UNKNOWN
OK = Response.OK
property name

handle) -> str

Type

(self

carb.datasource.acquire_datasource_interface(plugin_name: str = None, library_path: str = None) → carb::datasource::IDataSource
carb.datasource.get_datasource_interface(impl='carb.datasource-file.plugin') → carb.datasource._datasource.IDataSource

Returns cached carb.datasource.IDatasource interface