Skip to content

dzdomop

Warning

Preview of the next release (branch beta), not of the version on PyPI. The released version is documented here. To try the preview: pip install --pre dzdomop when a release candidate is out, or install the branch:

pip install "dzdomop @ git+https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models@beta#subdirectory=packages/dzdomop"

The OMOP Common Data Model (CDM) as Python classes for SQLAlchemy and SQLModel, plus a loader for the standardized vocabularies from Athena.

pip install dzdomop

Which guide do I need?

You want to Read
Create OMOP tables, write and query OMOP data in Python Use the models, start with the quickstart
Load an Athena vocabulary export into your database Load vocabularies
Update from an older version (0.4) Upgrading
Regenerate the models, change them or add a new CDM version Run the generator

What's in the package

CDM version Modules
5.3 omopmodel.OMOP_5_3_tables, _declarative, _dataclasses, _sqlmodels
5.4 omopmodel.OMOP_5_4_tables, _declarative, _dataclasses, _sqlmodels
5.5 omopmodel.OMOP_5_5_tables, _declarative, _dataclasses, _sqlmodels

Plus omopmodel.VocabulariesLoader and the dzdomop load-vocab command. Tested on SQLite and PostgreSQL, with Python 3.10 to 3.14.