download_wrds.disconnect_connection()

Close an open WRDS database connection safely.

Usage

Source

download_wrds.disconnect_connection(connection)

Attempts to close the supplied connection. Any exception raised by the underlying driver is swallowed so the call can be used in ‘finally’ blocks without masking the original error.

Parameters

connection: object
The connection object to close. Typically the value returned by ‘get_wrds_connection’.

Returns

bool
‘True’ on successful disconnection, ‘False’ if the close call raised an exception.

Examples

from tidyfinance import get_wrds_connection, disconnect_connection
con = get_wrds_connection()
disconnect_connection(con)