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 60 seconds:

fused.options.request_timeout = 60

Options

dir

__dir__() -> List[str]

base_url

base_url: str = PROD_DEFAULT_BASE_URL

Fused API endpoint

shared_udf_base_url

shared_udf_base_url: str = PROD_SHARED_UDF_DEFAULT_BASE_URL

Shared UDF 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

run_timeout

run_timeout: float = 130

Request timeout for UDF run requests to the Fused service

request_timeout

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

Request timeout for the Fused service

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

metadata_request_timeout

metadata_request_timeout: float = 60.0

Request timeout for file metadata requests (e.g., /file-metadata endpoint). These requests may involve processing large parquet files and can take longer.

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 | None = None

The base directory for storing cached results.

data_directory

data_directory: Path = None

The base directory for storing data results. Note: if storage type is 'object', then this path is relative to fd_prefix.

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

gcp_project_name

gcp_project_name: Optional[StrictStr] = None

Project name for GCS to use for GCS operations.

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 = 'npy,tiff'

Default transfer type for raster data

default_dtype_out_simple

default_dtype_out_simple: StrictStr = 'json'

Default transfer type for simple Python data (bool, int, float, str, list)

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

default_send_status_email

default_send_status_email: StrictBool = True

Whether to send a status email to the user when a job is complete.

cache_storage

cache_storage: StorageStr = 'auto'

Specify the default cache storage type

use_process_pool_for_local_submit

use_process_pool_for_local_submit: StrictBool = False

Use ProcessPoolExecutor instead of ThreadPoolExecutor for local engine submit. This avoids GDAL thread-safety issues and Python GIL limitations, but has higher memory overhead and slower startup time.

row_group_batch_size

row_group_batch_size: int = 32768

Target size in bytes for combining adjacent row group downloads. Adjacent row groups from the same file will be combined into single downloads until this threshold is reached. Default is 32KB (32768 bytes), which is optimized for S3 performance.

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.