Python sqlite3.sqlite_version() Examples

The following are 14 code examples of sqlite3.sqlite_version(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sqlite3 , or try the search function .
Example #1
Source File: parser_db.py    From guasap-whatsapp-foresincs-tool with GNU General Public License v3.0 6 votes vote down vote up
def analyze_db():
	conn = sqlite3.connect('WhatsappDB/msgstore.db')	
	cursor = conn.cursor()
	rows=list()

	print 'Module Version ',sqlite3.version
	print 'Library Version ',sqlite3.sqlite_version
	print ""

	for row in cursor.execute('SELECT * FROM messages where edit_version=7 and key_from_me = 1 ORDER BY _id'):
		row_date=str(row[7])
		if len(row_date)>10:
			row_date = row_date[:len(row_date)-3]
		row_date=datetime.datetime.fromtimestamp(int(row_date)).strftime('%Y-%m-%d %H:%M:%S')
		text = "Numero de telefono de whatsapp borrado [>] "+ str(str(row[1]).split("@")[0]) + "\nTimestamp [>] "+row_date
		print text
		rows.append(text)

	cursor.close()
	conn.close()
	return rows 
Example #2
Source File: PrerequisitesCheckerGramplet.py    From addons-source with GNU General Public License v2.0 6 votes vote down vote up
def check7_sqlite3(self):
        '''sqlite3
        #TODO need to add to required section readme

        https://stackoverflow.com/a/1546162
        '''
        self.append_text("\n")
        # Start check
        #SQLITE_MIN_VERSION = (0, 0, 0)

        try:
            import sqlite3
            # sqlite3.version - pysqlite version
            sqlite3_py_version_str = sqlite3.version
            # sqlite3.sqlite_version - sqlite version
            sqlite3_version_str = sqlite3.sqlite_version
        except ImportError:
            sqlite3_version_str = 'not found'
            sqlite3_py_version_str = 'not found'

        result = ("* SQLite Database library (sqlite3: " +
                  sqlite3_version_str + ") (Python-sqlite3: " +
                  sqlite3_py_version_str + ")")
        # End check
        self.append_text(result) 
Example #3
Source File: sqldata.py    From coveragepy with Apache License 2.0 6 votes vote down vote up
def sys_info(cls):
        """Our information for `Coverage.sys_info`.

        Returns a list of (key, value) pairs.

        """
        with SqliteDb(":memory:", debug=NoDebugging()) as db:
            temp_store = [row[0] for row in db.execute("pragma temp_store")]
            compile_options = [row[0] for row in db.execute("pragma compile_options")]

        return [
            ('sqlite3_version', sqlite3.version),
            ('sqlite3_sqlite_version', sqlite3.sqlite_version),
            ('sqlite3_temp_store', temp_store),
            ('sqlite3_compile_options', compile_options),
        ] 
Example #4
Source File: common.py    From sixcells with GNU General Public License v3.0 5 votes vote down vote up
def about(self):
        try:
            import pulp
        except ImportError:
            pulp_version = "(missing!)"
        else:
            pulp_version = pulp.VERSION
        try:
            import sqlite3
        except ImportError:
            sqlite_version = "(missing!)"
        else:
            sqlite_version = sqlite3.sqlite_version
        
        QMessageBox.information(None, "About", """
            <h1>{}</h1>
            <h3>Version {}</h3>

            <p>&copy; 2014-2016 Oleh Prypin &lt;<a href="mailto:blaxpirit@gmail.com">blaxpirit@gmail.com</a>&gt;<br/>
            &copy; 2014 Stefan Walzer &lt;<a href="mailto:sekti@gmx.net">sekti@gmx.net</a>&gt;</p>

            <p>License: <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License Version 3</a></p>

            Using:
            <ul>
            <li>Python {}
            <li>Qt {}
            <li>{} {}
            <li>PuLP {}
            <li>SQLite {}
            </ul>
        """.format(
            self.title, __version__,
            sys.version.split(' ', 1)[0],
            qt.version_str,
            qt.module, qt.module_version_str,
            pulp_version,
            sqlite_version,
        )) 
Example #5
Source File: appDB.py    From appcompatprocessor with Apache License 2.0 5 votes vote down vote up
def appDBDebugInfo(self):
        logger.debug("Sqlite database adapter version: %s" % sqlite3.sqlite_version) 
Example #6
Source File: sqlite.py    From gprime with GNU General Public License v2.0 5 votes vote down vote up
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 
Example #7
Source File: check-gmp.gmp.py    From gvm-tools with GNU General Public License v3.0 5 votes vote down vote up
def connect_db(self):
        """Connect to the database

        Simply connect to the database at location <path>
        """
        try:
            logger.debug("connect db: %s", self.db)
            self.con_db = sqlite3.connect(self.db)
            self.cursor = self.con_db.cursor()
            logger.debug(sqlite3.sqlite_version)
        except Exception as e:  # pylint: disable=broad-except
            logger.debug(e) 
Example #8
Source File: test_sqlite.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
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()]) 
Example #9
Source File: sqlite.py    From stash with MIT License 5 votes vote down vote up
def preloop(self):
        print('sqlite3 version %s' % sqlite3.sqlite_version)
        print('.(dot) is used for all none sql commands.')
        print('Use .help for non sqlite command list')
        print('All sql commands must end with ;')
        if self.database == ':memory:':
            print('Using database :memory:\nuse .open ?file? to open a database')
        else:
            print('Using databasse: %s' % self.database) 
Example #10
Source File: test_sqlite.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
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()]) 
Example #11
Source File: cachingfs.py    From dbxfs with GNU General Public License v3.0 5 votes vote down vote up
def check_runtime_requirements():
    if sqlite3.sqlite_version_info < (3, 9, 0):
        raise RuntimeError("Need sqlite version >= 3.9.0, you have: %r" % (sqlite3.sqlite_version,)) 
Example #12
Source File: patch.py    From aws-xray-sdk-python with Apache License 2.0 5 votes vote down vote up
def _xray_traced_connect(wrapped, instance, args, kwargs):

    conn = wrapped(*args, **kwargs)

    meta = {}
    meta['name'] = args[0]
    meta['database_version'] = sqlite3.sqlite_version

    traced_conn = XRayTracedSQLite(conn, meta)

    return traced_conn 
Example #13
Source File: test_sqlite.py    From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 5 votes vote down vote up
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()]) 
Example #14
Source File: test_sqlite.py    From android_universal with MIT License 5 votes vote down vote up
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(),
                               backup.suite()])