sqlitestructure is a Python library to dump table structure of a SQLite database file.
Project description
sqlitestructure
Summary
Python library to dump table structure of a SQLite database file.
Installation
pip install sqlitestructure
Usage
for verbosity_level in range(4):
six.print_("===== verbosity level {} =====".format(verbosity_level))
writer = sqlitestructure.TableStructureWriterFactory.create(
db_path, verbosity_level)
writer.echo_via_pager()
six.print_()
===== verbosity level 0 =====
testdb0
testdb1
===== verbosity level 1 =====
testdb0 (attr_a, attr_b)
testdb1 (foo, bar, hoge)
===== verbosity level 2 =====
testdb0 (attr_a INTEGER, attr_b INTEGER)
testdb1 (foo INTEGER, bar REAL, hoge TEXT)
===== verbosity level 3 =====
CREATE TABLE 'testdb0' ('attr_a' INTEGER, 'attr_b' INTEGER)
CREATE TABLE 'testdb1' ('foo' INTEGER, 'bar' REAL, 'hoge' TEXT)
CREATE INDEX testdb1_foo_index ON testdb1('foo')
CREATE INDEX testdb1_hoge_index ON testdb1('hoge')
Dependencies
Python 2.7+ or 3.3+
Test dependencies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sqlitestructure-0.1.0.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for sqlitestructure-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e352e2de86ea4ea2853345cc187a9c2827904d64e2f43e7abeb0102be0573f2b |
|
MD5 | dd7e055dc51ed60133932bed6a45cb7a |
|
BLAKE2b-256 | ac5a0abc34824fa37964640ef30c2e593407a5ed57742a644451d0f15f490d39 |