DynexConfig
Handles all SDK configuration: credentials, compute backend, gRPC endpoint, timeouts, and output formatting.Constructor
Parameters
str
SDK authentication key. If not provided, loaded from
DYNEX_SDK_KEY environment variable or .env file.str
gRPC server endpoint. Defaults to
"127.0.0.1:9090". Set via DYNEX_GRPC_ENDPOINT env var or provide directly.Production: "quantum-router-engine-grpc.hz.dynex.co:3000"ComputeBackend | str
default:"ComputeBackend.UNSPECIFIED"
Compute backend to use. Accepts enum value or string:
QPUModel | str
Required when
compute_backend=QPU. Available models:bool
default:"True"
Enable Jupyter-friendly output formatting (progress bars, tables).
float
default:"300.0"
Job timeout in seconds. Applies to network backends.
str
default:"\"Dynex SDK Job\""
Default job description shown in the Dynex job dashboard.
int
default:"5"
Number of retries for transient network failures.
bool
default:"False"
If
True, keep solution files on disk after sampling completes. Applies to LOCAL backend only — network backends store solutions in memory.bool
default:"False"
If
True, automatically delete local solution files after reading. Applies to LOCAL backend only.bool
default:"False"
If
True, write solution data to disk even when using a network backend (CPU, GPU, QPU). Files are saved to the tmp/ directory alongside job files. Useful for debugging raw solver output without switching to LOCAL mode.str
Custom path to
.env file. If not provided, searches current directory and up to 3 parent directories.str
Custom path to directory containing
dynexcore binary (LOCAL mode only).Configuration priority
Parameters are resolved in this order (highest to lowest priority):- Constructor arguments
- Environment variables (
DYNEX_SDK_KEY,DYNEX_GRPC_ENDPOINT, etc.) .envfile values (ifpython-dotenvis installed)- Default values