Skip to main content

fused.options

fused.options

List global configuration options.

This object contains a set of configuration options that control global behavior of the library. This object can be used to modify the options.

Examples:

Change the request_timeout option from its default value to 120 seconds:

fused.options.request_timeout = 120

Options

dir

__dir__() -> List[str]

base_url

base_url: str = PROD_DEFAULT_BASE_URL

Fused API endpoint

auth

auth: AuthOptions = Field(default_factory=AuthOptions)

Options for authentication.

show

show: ShowOptions = Field(default_factory=ShowOptions)

Options for object reprs and how data are shown for debugging.

max_workers

max_workers: int = 16

Maximum number of threads, when multithreading requests

request_timeout

request_timeout: Union[Tuple[float, float], float, None] = 120

Request timeout for the Fused service

May be set to a tuple of connection timeout and read timeout

request_max_retries

request_max_retries: int = 5

Maximum number of retries for API requests

request_retry_base_delay

request_retry_base_delay: float = 1.0

Base delay before retrying a API request in seconds

realtime_client_id

realtime_client_id: Optional[StrictStr] = None

Client ID for realtime service.

max_recursion_factor

max_recursion_factor: int = 5

Maximum recursion factor for UDFs. This is used to limit the number of recursive calls to UDFs. If a UDF exceeds this limit, an error will be raised.

save_user_settings

save_user_settings: StrictBool = True

Save per-user settings such as credentials and environment IDs.

default_udf_run_engine

default_udf_run_engine: Optional[StrictStr] = None

Default engine to run UDFs, one of: "local" or "remote".

default_validate_imports

default_validate_imports: StrictBool = False

Default for whether to validate imports in UDFs before run_local, run_batch.

prompt_to_login

prompt_to_login: StrictBool = False

Automatically prompt the user to login when importing Fused.

no_login

no_login: StrictBool = False

If set, Fused will not attempt to login automatically when needed.

pyodide_async_requests

pyodide_async_requests: StrictBool = False

If set, Fused is being called inside Pyodide and should use pyodide for async HTTP requests.

cache_directory

cache_directory: Path = Field(default_factory=_cache_directory)

The base directory for storing cached results.

data_directory

data_directory: Path = Field(default_factory=_data_directory)

The base directory for storing data results.

temp_directory

temp_directory: Path = Path(tempfile.gettempdir())

The base directory for storing temporary files.

never_import

never_import: StrictBool = False

Never import UDF code when loading UDFs.

gcs_secret

gcs_secret: str = 'gcs_fused'

Secret name for GCS credentials.

gcs_filename

gcs_filename: str = '/tmp/.gcs.fused'

Filename for saving temporary GCS credentials to locally or in rt2 instance

logging

logging: StrictBool = Field(default=False, validate_default=True)

Control logging for Fused

verbose_udf_runs

verbose_udf_runs: StrictBool = True

Whether to print logs from UDF runs by default

default_run_headers

default_run_headers: Optional[Dict[str, str]] = {
"X-Fused-Cache-Disable": "true"
}

(Advanced) Default headers to include with UDF run requests.

default_dtype_out_vector

default_dtype_out_vector: StrictStr = 'parquet'

Default transfer type for vector (tabular) data

default_dtype_out_raster

default_dtype_out_raster: StrictStr = 'tiff'

Default transfer type for raster data

fd_prefix

fd_prefix: Optional[str] = None

If set, where fd:// scheme URLs will resolve to. By default will infer this from your user account.

verbose_cached_functions

verbose_cached_functions: StrictBool = True

Whether to print logs from cache decorated functions by default

local_engine_cache

local_engine_cache: StrictBool = True

Enable UDF cache with local engine

base_web_url

base_web_url

save

save()

Save Fused options to ~/.fused/settings.toml. They will be automatically reloaded the next time fused-py is imported.