QldbDriver Reference

class pyqldb.driver.qldb_driver.QldbDriver(ledger_name, retry_limit=4, read_ahead=0, executor=None, region_name=None, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, config=None, boto3_session=None)[source]

Represents a factory for creating sessions to a specific ledger within QLDB. This class or pyqldb.driver.pooled_qldb_driver.PooledQldbDriver should be the main entry points to any interaction with QLDB. pyqldb.driver.qldb_driver.QldbDriver.get_session() will create a pyqldb.session.qldb_session.QldbSession to the specified edger within QLDB as a communication channel. Any sessions acquired should be cleaned up with pyqldb.session.qldb_session.QldbSession.close() to free up resources.

This factory does not attempt to re-use or manage sessions in any way. It is recommended to use pyqldb.driver.pooled_qldb_driver.PooledQldbDriver for both less resource usage and lower latency.


Create and return a newly instantiated QldbSession object. This will implicitly start a new session with QLDB.

Return type



A QldbSession object.


DriverClosedError – When this driver is closed.