Sqlschm

Latest version: v0.8.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.3.0

- Uniformize sequence types in Schemas

Previously the schemas used a mix of tuples and lists.
It now uses a single type: collections.abc.Sequence
This type is abstract and may represent as well a tuple as a list.
Moreover, it offers a readonly interface.

0.2.1

- Fix named constraints parsing

Previously sqlschm failed to parse named constraints.
Named constraints are now properly parsed. For instance:

sql
CREATE TABLE person(
fullname text,
CONSTRAINT a_name PRIMARY KEY (fullname)
);


- Fix table options generation

Previously sqlschm forgot to separate table options with a comma.

- Fix identifier generation

Previously the generator did not handle keywords as identifiers and
special strings as identifiers.
Now it quote every identifier and so handle keyword and special strings
as identifiers.

0.2.0

- Turn on type-checking for dependant projects

A type-checker looks for type stubs or `py.typed` file
in order to consume declared types.

0.1.0

- Basic support for parsing CREATE TABLE statement

Expressions in DEFAULT and CHECK clauses are skipped.

py
from sqlschm import parse_schema

statement = """
CREATE TABLE person(
fullname text NOT NULL PRIMARY KEY
);
"""

schema = parse_schema(statement)


- Basic support for generating CREATE TABLE from a schema

Only SQLite dialect is available.

py
from sqlschm import generate_schema, Dialect

schema is obtained from a parsing step
out = generate_schema(schema, Dialect.SQLITE)


[semver]: https://semver.org/spec/v2.0.0.html

Page 2 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.