Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

dzdomop: the OMOP CDM as Python classes

The OMOP Common Data Model (CDM) 5.3, 5.4 and 5.5 as ready-made SQLAlchemy and SQLModel classes, plus a loader for the standardized vocabularies you export from Athena.

  • Create a complete OMOP schema with one call
  • Write and query OMOP data with typed Python classes; the OMOP docs show up in your editor
  • Load an Athena export (folder, zip file or download link) into PostgreSQL or SQLite

Status: beta, your feedback is welcome.

Install

pip install dzdomop
Extra Installs Needed for
sqlmodel sqlmodel the OMOP_5_x_sqlmodels modules
postgres psycopg 3 PostgreSQL (psycopg2 and pg8000 work too)
pg8000 pg8000 PostgreSQL with postgresql+pg8000://
progress tqdm progress bars of the vocabulary loader

Quickstart

from sqlalchemy import create_engine, select
from sqlalchemy.orm import Session
from omopmodel import OMOP_5_4_declarative as omop

engine = create_engine("sqlite:///omop.db")
omop.metadata.create_all(engine)  # every OMOP CDM 5.4 table

with Session(engine) as session:
    care_site = omop.CareSite(care_site_id=1, care_site_name="St. Local")
    person = omop.Person(
        person_id=1,
        year_of_birth=1985,
        care_site=care_site,
        gender_concept_id=0,
        race_concept_id=0,
        ethnicity_concept_id=0,
    )
    session.add(person)
    session.commit()
    print(session.scalars(select(omop.Person)).one().care_site.care_site_name)

Load a vocabulary export from Athena (the zip file, the unzipped folder or the download link):

dzdomop load-vocab athena-export.zip --url sqlite:///omop.db --cdm-version 5.4 --create-tables

Documentation

Maintainer: Tim Bleimehl · License: MIT

Metadata

Release files for dzdomop 0.5.0rc1

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

Source distribution (sdist)

Source distribution for dzdomop 0.5.0rc1
File Size Uploaded Provenance Actions
dzdomop-0.5.0rc1.tar.gz 825.8 kB With provenance Details for dzdomop-0.5.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dzdomop 0.5.0rc1
File Interpreter ABI Platform Actions
dzdomop-0.5.0rc1-py3-none-any.whl Python 3 none any Details for dzdomop-0.5.0rc1-py3-none-any.whl

Total release size: 1.7 MB

Release files / dzdomop-0.5.0rc1.tar.gz

Download URL dzdomop-0.5.0rc1.tar.gz
Size 825.8 kB
Tags Source
SHA-256 checksum
How to use checksums
549e980c24d016700ac95cb47be7e60ef72c59b0e13dba50f33c3595f05bf088
BLAKE2b-256 checksum
How to use checksums
4b882b4ce83a8677e547c83c79a83158f4b967b77b4fdc45e45affc7a701ef4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / dzdomop-0.5.0rc1-py3-none-any.whl

Download URL dzdomop-0.5.0rc1-py3-none-any.whl
Size 841.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37ba06c212aa513133aa277b8ae18962d0149ebe925569b80389635df5dc4787
BLAKE2b-256 checksum
How to use checksums
7e7d97dfa23ccd91a1489a55ebd5e19017627dbf2ed292d92bfe5aecfa17e71f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for dzdomop 0.5.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dzdomop-0.5.0rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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