config.get_default_engine
config.get_default_engine()Return the default engine used by db2pq helpers.
This function checks, in order, a session override set with set_default_engine(), the DB2PQ_ENGINE environment variable, including values loaded from a local .env file when python-dotenv is installed, and finally the built-in default "duckdb".
Returns
| Name | Type | Description |
|---|---|---|
| str | The current session override if one was set with set_default_engine(). Otherwise, the value of the DB2PQ_ENGINE environment variable, including a value loaded from a local .env file if available. If neither is set, returns "duckdb". |
Examples
>>> from db2pq import get_default_engine
>>> get_default_engine()>>> import os
>>> os.environ["DB2PQ_ENGINE"] = "adbc"
>>> get_default_engine()
'adbc'