Skip to main content

sqlitestructure

https://badge.fury.io/py/sqlitestructure.svg https://img.shields.io/pypi/pyversions/sqlitestructure.svg 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

Release files for sqlitestructure 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlitestructure 0.2.0
File Size Uploaded
sqlitestructure-0.2.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlitestructure 0.2.0
File Interpreter ABI Platform
sqlitestructure-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 11.3 kB

Release files / sqlitestructure-0.2.0.tar.gz

Download URL sqlitestructure-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2db75b7c8cebc2c809749702cdd757738784099c73373f4b99d3d849cef0a1a9
BLAKE2b-256 checksum
How to use checksums
cc65cec7c69e81ce6d450cb05d93a4aad5e7dcb8d899a1232dc8dbc25a4f5760
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sqlitestructure-0.2.0-py2.py3-none-any.whl

Download URL sqlitestructure-0.2.0-py2.py3-none-any.whl
Size 5.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9a98cb346f5e9075968e942d45cfb3ebd52f2bb5aa0a2b03cf2683878a632c15
BLAKE2b-256 checksum
How to use checksums
3575f96d85f9623012e35bda1d1160f32070ae13986a38411b3a1e55147ef28a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page