Python sqlite3 模块,sqlite_version() 实例源码

我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用sqlite3.sqlite_version()

项目:gprime    作者:GenealogyCollective    | 项目源码 | 文件源码
def get_summary(cls):
        """
        Return a dictionary of information about this database backend.
        """
        summary = {
            "DB-API version": "2.0",
            "Database SQL type": cls.__name__,
            "Database SQL module": "sqlite3",
            "Database SQL Python module version": sqlite3.version,
            "Database SQL module version": sqlite3.sqlite_version,
            "Database SQL module location": sqlite3.__file__,
        }
        return summary
项目:appcompatprocessor    作者:mbevilacqua    | 项目源码 | 文件源码
def appDBDebugInfo(self):
        logger.debug("Sqlite database adapter version: %s" % sqlite3.sqlite_version)
项目:zippy    作者:securesystemslab    | 项目源码 | 文件源码
def test_main():
    if test.support.verbose:
        print("test_sqlite: testing with version",
              "{!r}, sqlite_version {!r}".format(sqlite3.version,
                                                 sqlite3.sqlite_version))
    test.support.run_unittest(dbapi.suite(), types.suite(),
                               userfunctions.suite(),
                               factory.suite(), transactions.suite(),
                               hooks.suite(), regression.suite(),
                               dump.suite())
项目:usres_monitor    作者:pierky    | 项目源码 | 文件源码
def load_sqlite(self, force_sqlite_lib=None):
        """Load sqlite3/apsw library

        If no hints are given, it tries the apsw library then sqlite3.
        """

        if force_sqlite_lib and force_sqlite_lib not in("sqlite3", "apsw"):
            raise USRESMonitorException(
                "Unknown SQLite library: {}. Must be sqlite3 or apsw".format(
                    force_sqlite_lib
                )
            )

        def load_sqlite3():
            import sqlite3 as sqlite_lib
            self.sqlite_lib = sqlite_lib
            self.sqlite_lib_name = "sqlite3"
            self.sqlite_version = sqlite_lib.sqlite_version

        def load_apsw():
            import apsw as sqlite_lib
            self.sqlite_lib = sqlite_lib
            self.sqlite_lib_name = "apsw"
            self.sqlite_version = sqlite_lib.sqlitelibversion()

        if force_sqlite_lib == "sqlite3":
            load_sqlite3()
        elif force_sqlite_lib == "apsw":
            load_apsw()
        else:
            try:
                load_apsw()
            except:
                load_sqlite3()
项目:My-Web-Server-Framework-With-Python2.7    作者:syjsu    | 项目源码 | 文件源码
def get_rdbms_metadata(self, cursor):
        import sqlite3
        return RDBMSMetadata('SQLite', 'SQLite 3', sqlite3.sqlite_version)
项目:web_ctp    作者:molebot    | 项目源码 | 文件源码
def load_tests(*args):
    if test.support.verbose:
        print("test_sqlite: testing with version",
              "{!r}, sqlite_version {!r}".format(sqlite3.version,
                                                 sqlite3.sqlite_version))
    return unittest.TestSuite([dbapi.suite(), types.suite(),
                               userfunctions.suite(),
                               factory.suite(), transactions.suite(),
                               hooks.suite(), regression.suite(),
                               dump.suite()])
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def load_tests(*args):
    if test.support.verbose:
        print("test_sqlite: testing with version",
              "{!r}, sqlite_version {!r}".format(sqlite3.version,
                                                 sqlite3.sqlite_version))
    return unittest.TestSuite([dbapi.suite(), types.suite(),
                               userfunctions.suite(),
                               factory.suite(), transactions.suite(),
                               hooks.suite(), regression.suite(),
                               dump.suite()])
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def load_tests(*args):
    if test.support.verbose:
        print("test_sqlite: testing with version",
              "{!r}, sqlite_version {!r}".format(sqlite3.version,
                                                 sqlite3.sqlite_version))
    return unittest.TestSuite([dbapi.suite(), types.suite(),
                               userfunctions.suite(),
                               factory.suite(), transactions.suite(),
                               hooks.suite(), regression.suite(),
                               dump.suite()])