Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

sqlitestructure is a Python library to dump table structure of a SQLite database file.

Project description

sqlitestructure

https://travis-ci.org/thombashi/sqlitestructure.svg?branch=master https://coveralls.io/repos/github/thombashi/sqlitestructure/badge.svg?branch=master

Summary

Python library to dump table structure of a SQLite database file.

Installation

pip install sqlitestructure

Usage

for verbosity_level in range(4):
    print("===== verbosity level {} =====".format(verbosity_level))
    writer = sqlitestructure.TableStructureWriter(db_path, verbosity_level)
    print("{}\n".format(writer.dumps()))
===== 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

This version
History Node

0.2.0

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sqlitestructure-0.2.0-py2.py3-none-any.whl (5.9 kB) Copy SHA256 hash SHA256 Wheel 2.7 Nov 23, 2016
sqlitestructure-0.2.0.tar.gz (5.4 kB) Copy SHA256 hash SHA256 Source None Nov 23, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page