{ "info": { "author": "The Children's Hospital of Philadelphia", "author_email": "cbmisupport@email.chop.edu", "bugtrack_url": null, "classifiers": [], "description": "# PEDSnetCDMs\n\nA python app for CDM model classes and DDL autogeneration.\n\nThe pedsnetcdms app creates python-importable sqlalchemy AND django style models for PEDSnet, Vocab, I2B2, and PCORnet CDMs. In addition, alembic AND django migrations can be created from those models. The alembic migrations can be used to auto-generate DDL files for all four CDMs.\n\nThe pedsnetcdms app is based on the declarative definition of models in JSON format (found in the `models.json` files) and the dynamic generation of python classes from those models (found in the `dj_makers.py` and `sa_makers.py` files). The generating functions are used in each CDM's `models.py` and `sa_models.py` files to put the model classes where the ORMs can find them. The `settings.py`, `alembic.ini`, and `alembic/env.py` files are simply ORM module configuration.\n\n## Installation\n\nA `pip install pedsnetcdms` should get you the package with the generated models and migrations ready for import into your python environment.\n\nHowever, if you want to generate the DDLs yourself or use the migrations directly on your database, you will have to clone the repository and install some or all of the following python packages and their (in some cases non-Python) dependencies, depending on which DBMS you are using:\n\n- cx-Oracle\n- psycopg2\n- pymssql\n- MySQL-python\n\nThis is left as an exercise for the reader. (Although perhaps a Dockerfile is in order...PR anyone?)\n\n## DDL Files\n\nDDL files for all four CDMs in PostgreSQL, Oracle, SQL Server, and MySQL dialects are available in the `pedsnetcdms/ddloutput` directory. They are hypothetical, so please test them and post an issue if you find a problem.\n\n## Model Usage\n\nDjango models are available at `pedsnetcdms..models` and sqlalchemy models are available at `pedsnetcdms..sa_models`, where `` should be replaced with one of the following:\n\n- pedsnetcdm\n- itwobtwocdm\n- vocabcdm\n- pcornetcdm\n\nYou can also include any of these apps in your django `INSTALLED_APPS` setting.\n\n## DDL Generation\n\nIn order to generate the DDL, install the required package(s) for your DBMS(s) from the list above, clone the repository and install the package.\n\nEdit the `pedsnetcdms//alembic/env.py` file for your desired CDMs to restrict the DBMSs for which DDL will be output (hint: the iterated list of tuples inside the `run_migrations_offline` function).\n\nFrom within the `pedsnetcdms` package directory (where the `alembic.ini` file is), run `alembic -n upgrade head --sql` and watch your DDL files appear!\n\n## Direct Migration Use\n\nInstall requirements, clone, and install the package as above.\n\nEdit the `alembic.ini` or `settings.py` files to specify the database URI you wish to connect to (notice that the setting is repeated under each CDMs section in `alembic.ini`).\n\nRun `alembic -n upgrade head` or `python manage.py migrate `.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/PEDSnet/pedsnetcdms/tarball/0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PEDSnet/Data_Models", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pedsnetcdms", "package_url": "https://pypi.org/project/pedsnetcdms/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pedsnetcdms/", "project_urls": { "Download": "https://github.com/PEDSnet/pedsnetcdms/tarball/0.1.1", "Homepage": "https://github.com/PEDSnet/Data_Models" }, "release_url": "https://pypi.org/project/pedsnetcdms/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "PEDSnet Common Data Model Definitions", "version": "0.1.1" }, "last_serial": 1456109, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "34ebd8021f7f3070d0fd7a0ae016e648", "sha256": "1a83940bee349b09472ef7f6afa2b1bc0f752f18e6adb78ebdd8a102164f81fd" }, "downloads": -1, "filename": "pedsnetcdms-0.1.tar.gz", "has_sig": false, "md5_digest": "34ebd8021f7f3070d0fd7a0ae016e648", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20278, "upload_time": "2015-03-04T11:47:46", "url": "https://files.pythonhosted.org/packages/f1/2b/b27f2b20b3993c9487de175a6c4e048e946c0728267940c51e42c8efe29c/pedsnetcdms-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "78c2f9e44b184026ab1fbb109c8ac42f", "sha256": "a01d14862f98a6004be19a341265b3e25a950ae0ddfc013728b140329739685c" }, "downloads": -1, "filename": "pedsnetcdms-0.1.1.tar.gz", "has_sig": false, "md5_digest": "78c2f9e44b184026ab1fbb109c8ac42f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20492, "upload_time": "2015-03-10T16:38:21", "url": "https://files.pythonhosted.org/packages/cf/9d/3a65f84337764662b2349ee941e383b0140f8ba60705c1be159772c3112e/pedsnetcdms-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "78c2f9e44b184026ab1fbb109c8ac42f", "sha256": "a01d14862f98a6004be19a341265b3e25a950ae0ddfc013728b140329739685c" }, "downloads": -1, "filename": "pedsnetcdms-0.1.1.tar.gz", "has_sig": false, "md5_digest": "78c2f9e44b184026ab1fbb109c8ac42f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20492, "upload_time": "2015-03-10T16:38:21", "url": "https://files.pythonhosted.org/packages/cf/9d/3a65f84337764662b2349ee941e383b0140f8ba60705c1be159772c3112e/pedsnetcdms-0.1.1.tar.gz" } ] }