We are happy to announce a new release of our Python package, pysmartdatamodels, version 0.8.0.11, focused on making the SQL schema generation function more robust, fixing how the package exposes its functions, and keeping our GitHub source and published package in sync.
What’s New in This Version?
More Reliable SQL Schema Generation
The generate_sql_schema() function, which turns a data model’s model.yaml into a ready-to-use PostgreSQL CREATE TABLE statement, received three fixes:
- Column names are now properly quoted, so attribute names that are reserved words or mixed case no longer produce invalid SQL.
- Properties using
anyOfare now supported, in addition tooneOf. - The function no longer emits a duplicate
idcolumn in the generated schema.
Example:
from pysmartdatamodels import pysmartdatamodels as sdm
sql = sdm.generate_sql_schema("https://raw.githubusercontent.com/smart-data-models/dataModel.Weather/master/WeatherForecast/model.yaml")
print(sql)
More Usable Imports
You can now import the package’s main functions directly from the top level, instead of always going through the submodule:
from pysmartdatamodels import generate_sql_schema, load_all_datamodels
The documented usage pattern below continues to work exactly as before:
from pysmartdatamodels import pysmartdatamodels as sdm
Repository Housekeeping
The source code published on GitHub and the package published on PyPI had drifted apart over the last few releases. With this version, both are back in sync, so what you see in the repository is exactly what you get when you pip install the package.
Get the Latest Version
Update your installation with:
pip install --upgrade pysmartdatamodels
Our Commitment to Open and Interoperable Data
We are committed to making data interoperability easier for everyone. Thanks to everyone in the community who reports issues and helps us keep improving pysmartdatamodels!

