dzdomop


Namedzdomop JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryA Python ORM/data classes representation of the OMOP Common Data Model in different flavors powered by sqlacodegen
upload_time2025-01-15 14:09:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords dzd omop
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DZD - OMOP CDM Python ORM/Data Classes Representation
A Python ORM/data classes representation of the [Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM)](https://www.ohdsi.org/data-standardization/) in different flavors powered by [sqlacodegen](https://github.com/agronholm/sqlacodegen)

Author/Maintainer: Tim Bleimehl  

For more background how this sausage is made have a look at the github repo at https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models

This Readme is a "work in process". Come back later for a more complete manual.

# Install

Just install the python module from pypi.org

`python -m pip install --upgrade dzdomop`

# How to use



This tiny script demostrates how this module can help you to
* Create a local dev database with the complete omop datamodel
* insert some data based on our classes with some basic guardrails like type validation, typo prevention, ...

```python
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from omopmodel import OMOP_5_3_declarative as omop

# Create a local SQLite database with all OMOP CDM tables+properties
engine = create_engine("sqlite:///cdm_source.db", echo=True)
omop.Base.metadata.create_all(engine)

# Create a some basic OMOP objects
care_site = omop.CareSite(care_site_id=5678, care_site_name="St. Local")
person = omop.Person(
    person_id=1234,
    year_of_birth=1985,
    care_site=care_site,
    gender_concept_id=1,
    race_concept_id=1,
    ethnicity_concept_id=1,
)

# Write the Object to the database
with Session(engine) as session:
    session.add(care_site)
    session.add(person)
    session.commit()
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dzdomop",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "DZD, OMOP",
    "author": null,
    "author_email": "Tim Bleimehl <bleimehl@helmholtz-munich.de>",
    "download_url": "https://files.pythonhosted.org/packages/0a/c9/dfc770a6e8ddbc7c34b3684e329f17deb6e45c94dec0dff221d90f846970/dzdomop-0.4.0.tar.gz",
    "platform": null,
    "description": "# DZD - OMOP CDM Python ORM/Data Classes Representation\nA Python ORM/data classes representation of the [Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM)](https://www.ohdsi.org/data-standardization/) in different flavors powered by [sqlacodegen](https://github.com/agronholm/sqlacodegen)\n\nAuthor/Maintainer: Tim Bleimehl  \n\nFor more background how this sausage is made have a look at the github repo at https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models\n\nThis Readme is a \"work in process\". Come back later for a more complete manual.\n\n# Install\n\nJust install the python module from pypi.org\n\n`python -m pip install --upgrade dzdomop`\n\n# How to use\n\n\n\nThis tiny script demostrates how this module can help you to\n* Create a local dev database with the complete omop datamodel\n* insert some data based on our classes with some basic guardrails like type validation, typo prevention, ...\n\n```python\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import Session\nfrom omopmodel import OMOP_5_3_declarative as omop\n\n# Create a local SQLite database with all OMOP CDM tables+properties\nengine = create_engine(\"sqlite:///cdm_source.db\", echo=True)\nomop.Base.metadata.create_all(engine)\n\n# Create a some basic OMOP objects\ncare_site = omop.CareSite(care_site_id=5678, care_site_name=\"St. Local\")\nperson = omop.Person(\n    person_id=1234,\n    year_of_birth=1985,\n    care_site=care_site,\n    gender_concept_id=1,\n    race_concept_id=1,\n    ethnicity_concept_id=1,\n)\n\n# Write the Object to the database\nwith Session(engine) as session:\n    session.add(care_site)\n    session.add(person)\n    session.commit()\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python ORM/data classes representation of the OMOP Common Data Model in different flavors powered by sqlacodegen",
    "version": "0.4.0",
    "project_urls": {
        "Issues": "https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models/issues",
        "Source": "https://github.com/DZD-eV-Diabetes-Research/dzd-omop-cdm-python-models"
    },
    "split_keywords": [
        "dzd",
        " omop"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "245cc0cce868c6b4c75216b571d6a7e4e368d048cbddcdfb1c928c35201efb8f",
                "md5": "8c00038767c5aa5f9d65ebd48ff0e3e2",
                "sha256": "b26d84fd1048cde95856a484e49baa4da63fea64b31cdf79f6f6d3111858cfe1"
            },
            "downloads": -1,
            "filename": "dzdomop-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c00038767c5aa5f9d65ebd48ff0e3e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 348286,
            "upload_time": "2025-01-15T14:09:08",
            "upload_time_iso_8601": "2025-01-15T14:09:08.912941Z",
            "url": "https://files.pythonhosted.org/packages/24/5c/c0cce868c6b4c75216b571d6a7e4e368d048cbddcdfb1c928c35201efb8f/dzdomop-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ac9dfc770a6e8ddbc7c34b3684e329f17deb6e45c94dec0dff221d90f846970",
                "md5": "94c6a366d374db1731defcbe079fdeba",
                "sha256": "aafed26355bdace1e6c1a4878d01e38cb366ff517d5d230546dc1b6c301703da"
            },
            "downloads": -1,
            "filename": "dzdomop-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "94c6a366d374db1731defcbe079fdeba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 341926,
            "upload_time": "2025-01-15T14:09:12",
            "upload_time_iso_8601": "2025-01-15T14:09:12.200564Z",
            "url": "https://files.pythonhosted.org/packages/0a/c9/dfc770a6e8ddbc7c34b3684e329f17deb6e45c94dec0dff221d90f846970/dzdomop-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-15 14:09:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DZD-eV-Diabetes-Research",
    "github_project": "dzd-omop-cdm-python-models",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dzdomop"
}
        
Elapsed time: 1.60884s