Client API¶
- class Client(host: str | None = None, port: int | None = None, username: str | None = None, password: str | None = None, dataset: str | None = None, local_backend: str | None = None, proxy_host: str | None = None, proxy_port: int | None = None)[source]¶
Client API for dataClay.
Usually you create client instance and call start() method to initialize it.
from dataclay import Client client = Client(host="127.0.0.1") client.start()
All the Client configuration variables are detailed in
ClientSettings.- Parameters:
host – Metadata Service host. It is mutually exclusive with proxy_host.
port – Metadata Service port. Optional. Use if you want to override the default port.
username – Username. Authentication and authorization happens only at the Proxy.
password – DEPRECATED
dataset – Dataset name. All objects created by this client will be associated with this dataset.
local_backend – Name of the local backend. If set, the client will use this backend for all operations.
proxy_host – Proxy host. It is mutually exclusive with host. If this is set, this client will connect to the proxy instead for communicating with the metadata service or any backend.
proxy_port – Proxy port. Optional. Use if you want to override the default port.
- get_backends() dict[UUID, BackendClient][source]¶
Get all backends available in the system.
This method connects to the metadata service and retrieves an up-to-date list of backends.
- async a_get_backends() dict[UUID, BackendClient][source]¶
Asynchronous version of
get_backends()