config

client.config

TileDB client session configuration

This module maintains the global state of client session configuration and several methods for loading it from and saving it to profiles on disk.

Classes

Name Description
ConfigurationError Raise for configuration-related errors

ConfigurationError

client.config.ConfigurationError()

Raise for configuration-related errors

Functions

Name Description
load_configuration Loads parameters and configures the session’s client.
setup_configuration Configures the session’s client.
setup_default_ctx Updates the TileDB-Py default context with the current profile’s REST parameters.

load_configuration

client.config.load_configuration()

Loads parameters and configures the session’s client.

Configuration parameters are obtained from the user’s default TileDB profile or from the environment via tiledb.Config.

This enables login-free execution of Python applications using the default profile and/or properly configured environment. To use a different profile, one must call tiledb.client.login().

Configuration parameters may come from several sources, in order of precedence:

  • user-configured config values
  • environment variables
  • profile values
  • default config values

Raises

Name Type Description
ConfigurationError When configuration parameters are not sufficent and server requests are not possible.

Notes

This function is called once at most during any Python interpreter session or program lifetime, on the first access of tiledb.client.config, such as during the first HTTP server request.

setup_configuration

client.config.setup_configuration(
    api_key=None,
    host='',
    username=None,
    password=None,
    verify_ssl=True,
    ca_file=None,
    workspace=None,
)

Configures the session’s client.

setup_default_ctx

client.config.setup_default_ctx()

Updates the TileDB-Py default context with the current profile’s REST parameters.

This function synchronizes the TileDB-Py default context with the REST parameters from the currently active profile (as specified by TILEDB_PROFILE_* environment variables). It preserves all non-REST configuration parameters while replacing all rest.* parameters with those from the new profile.