Client Profiles Reference

This is a comprehensive reference. See also Use Profiles to streamline Python client setup for a practical guide with examples.

A profiles YAML file must contain a mapping with one or more keys. The keys may be any string. The value of each entry is described below.

The content below is automatically generated from a schema that is used to validate profiles when they are read.

uri

URI of a Tiled server, such as

http://localhost:8000

username

For authenticated Trees. Optional unless the Tree requires authentication.

auth_provider

Authentication provider. If unspecified and there are multiple providers supported by the server, the client will prompt the user to choose one.

headers

Extra HTTP headers

offline

False by default. When true, rely solely on cache. Do not attempt to connect to server.

direct

In-line service configuration. See Service Configuration reference.

structure_clients

Client to read structure into. Default (“numpy”) uses numpy arrays, pandas DataFrames, and xarrays backed by numpy arrays.

structure_clients: "numpy"

The “dask” option uses the dask-based analogues of these.

structure_clients: "dask"

To use custom clients, map each structure family or spec you want to support to an import path:

structure_clients:
  array: "package.module:CustomArrayClient"
  dataframe: "package.module:CustomDataFrameClient"
  my_custom_spec: "package.module:CUstomClient"

cache

cache.memory

cache.memory.capacity

Maximum memory (in bytes) that the cache may consume.

For readability it is recommended to use _ for thousands separators. Example:

available_bytes: 2_000_000_000  # 2GB

cache.memory.available_bytes

Deprecated alias for “capacity”

cache.disk

cache.disk.path

A directory will be created at this path if it does not yet exist. It is safe to reuse an existing cache directory and to share a cache directory between multiple processes. available_bytes:

cache.disk.capacity

Maximum storage space (in bytes) that the cache may consume.

For readability it is recommended to use _ for thousands separators. Example:

available_bytes: 2_000_000_000  # 2GB

cache.disk.available_bytes

Deprecated alias for “capacity”

timeout

Configure timeouts for the HTTP client.

Tiled sets read and write timeouts very high (30 seconds) by default to accommodate pulling ~100 MB chunks over a slow network connection.

Units are seconds. For details see https://www.python-httpx.org/advanced/#timeout-configuration

timeout.connection

timeout.read

timeout.write

timeout.pool

token_cache

Filepath to directory of access tokens. Default location is usually suitable. The default is system-dependent and can be inspected at tiled.client.context.DEFAULT_TOKEN_CACHE.

verify

Set to False to disable SSL verification.