The dbconn module defines DbConnection.
>>> from pyrseas.lib.dbconn import DbConnection >>> db = DbConnection('dbname') >>> db.fetchone("SHOW server_version") >>> db.commit()
A DbConnection is not necessarily connected. In the case of Pyrseas dbtoyaml </dbtoyaml> and yamltodb </yamltodb>, it will typically connect to the database when the ~pyrseas.dbobject.DbObjectDict ~pyrseas.dbobject.DbObjectDict.fetch method is first invoked. It is normally disconnected just before the ~pyrseas.database.Database ~pyrseas.database.Database.from_catalog returns.