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):
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 | 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.2.0.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file sqlitestructure-0.2.0.tar.gz
.
File metadata
- Download URL: sqlitestructure-0.2.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db75b7c8cebc2c809749702cdd757738784099c73373f4b99d3d849cef0a1a9 |
|
MD5 | ddc0ae39e787b54c5b4ef3905487da10 |
|
BLAKE2b-256 | cc65cec7c69e81ce6d450cb05d93a4aad5e7dcb8d899a1232dc8dbc25a4f5760 |
File details
Details for the file sqlitestructure-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: sqlitestructure-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a98cb346f5e9075968e942d45cfb3ebd52f2bb5aa0a2b03cf2683878a632c15 |
|
MD5 | 43f93c779b8872d2b8d188dd33c4c085 |
|
BLAKE2b-256 | 3575f96d85f9623012e35bda1d1160f32070ae13986a38411b3a1e55147ef28a |