tiled.client.from_tree

tiled.client.from_tree(tree, structure_clients='numpy', *, authentication=None, server_settings=None, query_registry=None, serialization_registry=None, compression_registry=None, validation_registry=None, cache=None, offline=False, username=None, auth_provider=None, api_key=None, token_cache='/home/runner/.cache/tiled/tokens', headers=None, timeout=None, prompt_for_reauthentication=None)[source]

Connect to a Node directly, running the app in this same process.

NOTE: This is experimental. It may need to be re-designed or even removed.

In this configuration, we are using the server, but we are communicating with it directly within this process, not over a local network. It is generally faster.

Specifically, we are using HTTP over ASGI rather than HTTP over TCP. There are no sockets or network-related syscalls.

Parameters
treeNode
structure_clientsstr or dict, optional

Use “dask” for delayed data loading and “numpy” for immediate in-memory structures (e.g. normal numpy arrays, pandas DataFrames). For advanced use, provide dict mapping a structure_family or a spec to a client object.

authenticationdict, optional

Dict of authentication configuration.

usernamestr, optional

Username for authenticated access.

auth_providerstr, optional

Name of an authentication provider. If None and the server supports multiple provides, the user will be interactively prompted to choose from a list.

api_keystr, optional

API key based authentication. Cannot mix with username/auth_provider.

cacheCache, optional
offlinebool, optional

False by default. If True, rely on cache only.

token_cachestr, optional

Path to directory for storing refresh tokens.

prompt_for_reauthenticationbool, optional

If True, prompt interactively for credentials if needed. If False, raise an error. By default, attempt to detect whether terminal is interactive (is a TTY).

timeouthttpx.Timeout, optional

If None, use Tiled default settings. (To disable timeouts, use httpx.Timeout(None)).