How to use the sqlitedict.open function in sqlitedict

To help you get started, we’ve selected a few sqlitedict examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RaRe-Technologies / sqlitedict / tests / test_core.py View on Github external
def test_terminate_instead_close(self):
        ''' make terminate() instead of close()
        '''
        d = sqlitedict.open('tests/db/sqlitedict-terminate.sqlite')
        d['abc'] = 'def'
        d.commit()
        self.assertEqual(d['abc'], 'def')
        d.terminate()
        self.assertFalse(os.path.isfile('tests/db/sqlitedict-terminate.sqlite'))
github RaRe-Technologies / sqlitedict / tests / test_utils.py View on Github external
def test_terminate_instead_close(self):
        ''' make terminate() instead of close()
        '''
        d = sqlitedict.open('tests/db/sqlitedict-terminate.sqlite')
        d['abc'] = 'def'
        d.commit()
        self.assertEqual(d['abc'], 'def')
        d.terminate()
        self.assertFalse(os.path.isfile('tests/db/sqlitedict-terminate.sqlite'))

sqlitedict

Persistent dict in Python, backed up by sqlite3 and pickle, multithread-safe.

Apache-2.0
Latest version published 1 year ago

Package Health Score

69 / 100
Full package analysis

Similar packages