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

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.filepath

Location of cache file on disk. Default location is $XDG_CACHE_HOME/tiled/http_response_cache.db.

cache.capacity

Maximum size (in bytes) that the cache may allocate for response bodies. The total size of a cache may be slightly higher. Default is 500 MB.

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

capacity: 500_000_000  # 500 MB

cache.max_item_size

Maximum size (in bytes) of any individual cached response body. This limit is designed to prevent one a couple very large responses from using up the entire capacity.

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

capacity: 500_000  # 500 kB

cache.readonly

Open the cache in read-only mode. Do not add, remove, or update contents.

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. It is in the tokens subdirectory of TILED_CACHE_DIR, which is system-dependent and can be inspected at tiled.client.context.TILED_CACHE_DIR.

verify

Set to False to disable SSL verification.