{ "info": { "author": "The Children's Hospital of Philadelphia", "author_email": "cbmisupport@email.chop.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Healthcare Industry", "Intended Audience :: Science/Research", "License :: Other/Proprietary License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Database", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Data Models Django\n\n[![Circle CI](https://circleci.com/gh/chop-dbhi/data-models-django/tree/master.svg?style=svg)](https://circleci.com/gh/chop-dbhi/data-models-django/tree/master) [![Coverage Status](https://coveralls.io/repos/chop-dbhi/data-models-django/badge.svg?branch=master&service=github)](https://coveralls.io/github/chop-dbhi/data-models-django?branch=master)\n\nDjango model generator for [chop-dbhi/data-models-service](https://data-model-service.research.chop.edu) style JSON metadata.\n\n## Installation\n\nIf you're not using a Python virtual environment, please do. I prefer [pyenv](https://github.com/yyuu/pyenv) with [pyenv-virtualenv](https://github.com/yyuu/pyenv-virtualenv).\n\nGet the most recent stable version:\n\n```\npip install dmdj\n```\n\nOr build and install the (unstable) `HEAD` version:\n\n```\ngit clone https://github.com/chop-dbhi/data-models-django.git\ncd data-models-django\nmake install\n```\n\n## Usage\n\nPlace the following in your app's `models.py` file:\n\n```python\nimport requests\nfrom django.db import models\nfrom dmdj.settings import get_url\nfrom dmdj.makers import make_model\n\nmodel_url = get_url('pednet', '2.1.0')\nmodel_json = requests.get(model_url).json()\n\nfor model in make_model(model_json, (models.Model,), module='yourapp.models',\n app_label='yourapp')\n globals()[model.__name__] = model\n```\n\nThis code causes a single web request at runtime, which may slow down your app's startup. Also, the models are dynamically generated and so may change over time, although efforts to improve the semantic versioning and stability practices in the data-models repo are under way.\n\n## Development\n\n### Installation\n\nInstall the development requirements and the package in \"editable\" mode.\n\n```\ngit clone https://github.com/chop-dbhi/data-models-django.git\ncd data-models-django\nmake devinstall\n```\n\n### Testing\n\nTests are run on the source code using `tox` to replicate them across the range of compatible `Django` and `Python` versions, for the `Python` versions you have available in your environment. I like to create a `dmdj` virtual environment from `3.5.x` and then use `pyenv local dmdj 3.4.x 2.7.x`\n\n```\nmake test\n```\n\n### Coverage\n\nGenerate test coverage information that prints in the terminal and creates HTML and XML format files.\n\n```\nmake coverage\n```\n\n## Deployment\n\nThese tasks are routinely handled by the CI/CD workflow, but I'll document them here anyway.\n\n### Coveralls\n\nPublish test coverage information to coveralls (the project must be registered and the token must be in the `COVERALLS_REPO_TOKEN` env var).\n\n```\nmake coveralls\n```\n\n### Release\n\nRelease a new final version by pushing a new tag to GitHub and uploading the dist files to PyPi (the project must be registered at PyPi and you must have PyPi credentials available or in the `PYPI_USER` and `PYPI_PASS` env vars).\n\n```\nmake release\n```\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/chop-dbhi/data-models-django/tarball/0.4.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chop-dbhi/data-models-django", "keywords": "healthcare,data models,Django,OMOP,OHDSI,i2b2,PCORnet,PEDSnet", "license": "Other/Proprietary", "maintainer": "", "maintainer_email": "", "name": "dmdj", "package_url": "https://pypi.org/project/dmdj/", "platform": "", "project_url": "https://pypi.org/project/dmdj/", "project_urls": { "Download": "https://github.com/chop-dbhi/data-models-django/tarball/0.4.2", "Homepage": "https://github.com/chop-dbhi/data-models-django" }, "release_url": "https://pypi.org/project/dmdj/0.4.2/", "requires_dist": [ "Django (>=1.7,<1.11)" ], "requires_python": "", "summary": "Django model generator for JSON metadata", "version": "0.4.2" }, "last_serial": 2319443, "releases": { "0.3.5": [ { "comment_text": "", "digests": { "md5": "e802ae6c91561f9cc3854edd4700bc58", "sha256": "54d84ba8ba9e0769fd649bed560e33830e1d5b00af0a6a447e644fb590e0d69a" }, "downloads": -1, "filename": "dmdj-0.3.5-py2.7.egg", "has_sig": false, "md5_digest": "e802ae6c91561f9cc3854edd4700bc58", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 19843, "upload_time": "2015-09-05T15:45:28", "url": "https://files.pythonhosted.org/packages/a9/ce/fdbd8ff3d4c43e7db2415fa3e217be4f7dcb047087319814cd90a534932f/dmdj-0.3.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2e55bc8da8490a19c375c44b3228914b", "sha256": "47e04a14ccb0883806bbe7eefac0a9475bd8bdd1182b2739ae8761cf8281a382" }, "downloads": -1, "filename": "dmdj-0.3.5-py2-none-any.whl", "has_sig": false, "md5_digest": "2e55bc8da8490a19c375c44b3228914b", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11274, "upload_time": "2015-09-05T15:45:53", "url": "https://files.pythonhosted.org/packages/a9/e5/fdc13be68707662738b3caaa49b0c13c4b9d278dc4d0bc4aec1046036036/dmdj-0.3.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c86ac3796a9a387ce80bf4d0b2cde69", "sha256": "25dedb54d28bf437ced19d65e366d6c3565138648f830cac6722c540bb777a7b" }, "downloads": -1, "filename": "dmdj-0.3.5.tar.gz", "has_sig": false, "md5_digest": "0c86ac3796a9a387ce80bf4d0b2cde69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7808, "upload_time": "2015-09-05T15:46:25", "url": "https://files.pythonhosted.org/packages/e3/5b/52890e242e34aaba2bb3094723fb5e6237fbb36d28f766f53aa38d54be62/dmdj-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "f08f116d0a232c8ac489458f14564830", "sha256": "beb825f6ebcd7839815d79951ff18b59234e793e83f7396b918520aace405e6e" }, "downloads": -1, "filename": "dmdj-0.3.6-py2.7.egg", "has_sig": false, "md5_digest": "f08f116d0a232c8ac489458f14564830", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 19846, "upload_time": "2015-09-05T16:03:40", "url": "https://files.pythonhosted.org/packages/ee/7d/e00d7ccc3a8f50d2631c40190292b013b9c35fc6c30994ba2dba1692ae2f/dmdj-0.3.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "11424dc38e8f673eda4b0bae38eb1f11", "sha256": "8ffe5a26342d961582693a61c9b48cf13c0adca981c9ff8b71264f99edabf997" }, "downloads": -1, "filename": "dmdj-0.3.6-py2-none-any.whl", "has_sig": false, "md5_digest": "11424dc38e8f673eda4b0bae38eb1f11", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11277, "upload_time": "2015-09-05T16:03:52", "url": "https://files.pythonhosted.org/packages/95/2b/8db97268d148f355a29d6deee9db2367b8644c9c17cb5b635eea936952fe/dmdj-0.3.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09a771bfef31ef655600efeed77dce1d", "sha256": "a1e6a6a6290a4978484d5c769461abe66a5e1a1efb8eb03fea3300ad9c3ccf18" }, "downloads": -1, "filename": "dmdj-0.3.6.tar.gz", "has_sig": false, "md5_digest": "09a771bfef31ef655600efeed77dce1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7801, "upload_time": "2015-09-05T16:04:16", "url": "https://files.pythonhosted.org/packages/84/12/3c0a31ad30d34ecb6f09cd7c523ec7846fc9937ea532517398270509ae4d/dmdj-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "be7ac3d66c2a6f77a3f167e3b7a95763", "sha256": "ff71b7cad232743449a8544eb54215d1580dabccc511f4ade1dcd9676cbc3e46" }, "downloads": -1, "filename": "dmdj-0.3.7-py2.7.egg", "has_sig": false, "md5_digest": "be7ac3d66c2a6f77a3f167e3b7a95763", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 19919, "upload_time": "2016-01-28T23:49:41", "url": "https://files.pythonhosted.org/packages/c8/73/bf813c186ce2fdf273bd0f7afb0a53c85ea8f28d18d537ac90c71611f2af/dmdj-0.3.7-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "cf23ce9beff89ae25e017a5e240967df", "sha256": "f3701e51fb64b54fdae4cccc657e1afcca5f57ca61f92b27a7cae3a24d8029aa" }, "downloads": -1, "filename": "dmdj-0.3.7-py2-none-any.whl", "has_sig": false, "md5_digest": "cf23ce9beff89ae25e017a5e240967df", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11305, "upload_time": "2016-01-28T23:49:35", "url": "https://files.pythonhosted.org/packages/97/54/1dbbd9fc948ce9064746270b3818647f8305b9b048d4c1de915b13ba1086/dmdj-0.3.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00076b08fd8f9e7342266228d35faa85", "sha256": "33867e955f9b05410bdcdb66e993f02ea8f0ecfa5b0c683673fd0f3d684f20c0" }, "downloads": -1, "filename": "dmdj-0.3.7.tar.gz", "has_sig": false, "md5_digest": "00076b08fd8f9e7342266228d35faa85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7828, "upload_time": "2016-01-28T23:49:48", "url": "https://files.pythonhosted.org/packages/b9/7c/2db9b009de2aaaebd807211f84c24438e2d90ba0026ab00fb531e380e6b8/dmdj-0.3.7.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "efd25f99076210d624a9def284c4f84f", "sha256": "4e0dc837c6a74a47476a478dc943141e14791daa18531a353d06f5b24b2fd8e3" }, "downloads": -1, "filename": "dmdj-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "efd25f99076210d624a9def284c4f84f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10893, "upload_time": "2016-08-30T18:07:51", "url": "https://files.pythonhosted.org/packages/6c/cf/654d11913e3745b2f93cdb1341cc12321ecc02f7f8f8cf99a55e6b3ccd7c/dmdj-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca5c181ea51f8fde84d0ed8d826da1db", "sha256": "bfb1e03e35f90b229731375ea8a7c78e57ea8c0bc7d229e34dd324547139a47c" }, "downloads": -1, "filename": "dmdj-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ca5c181ea51f8fde84d0ed8d826da1db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6204, "upload_time": "2016-08-30T18:07:54", "url": "https://files.pythonhosted.org/packages/ea/d5/fe6a020bd2ef648df321204150ba135d735e3fc01f0e6f9f2524c4c05ee2/dmdj-0.4.0.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "44c9ef3e7bead9ed9f09a2e1ce149ba6", "sha256": "d4f55f070896c7bc02ea51685cbfb5431268badc0e461a4680550330815f7e9b" }, "downloads": -1, "filename": "dmdj-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "44c9ef3e7bead9ed9f09a2e1ce149ba6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10793, "upload_time": "2016-09-01T20:23:12", "url": "https://files.pythonhosted.org/packages/d2/e4/1d9d6b1b2ea8dbeb82b2ee5780c66e9edd4a08c9019ad181bd869c0fd4da/dmdj-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40697fe05b74ab4b89a0afb3c46d5689", "sha256": "ef2488f6f2e9eca1339ac526649e5699d6b60d06b7c258b1c9b2532ab7f3412a" }, "downloads": -1, "filename": "dmdj-0.4.2.tar.gz", "has_sig": false, "md5_digest": "40697fe05b74ab4b89a0afb3c46d5689", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6157, "upload_time": "2016-09-01T20:23:15", "url": "https://files.pythonhosted.org/packages/f5/f8/6f56830e68e9c056901a83a65cdac47026b0a22a2e606522ab2e66a9f597/dmdj-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "44c9ef3e7bead9ed9f09a2e1ce149ba6", "sha256": "d4f55f070896c7bc02ea51685cbfb5431268badc0e461a4680550330815f7e9b" }, "downloads": -1, "filename": "dmdj-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "44c9ef3e7bead9ed9f09a2e1ce149ba6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10793, "upload_time": "2016-09-01T20:23:12", "url": "https://files.pythonhosted.org/packages/d2/e4/1d9d6b1b2ea8dbeb82b2ee5780c66e9edd4a08c9019ad181bd869c0fd4da/dmdj-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40697fe05b74ab4b89a0afb3c46d5689", "sha256": "ef2488f6f2e9eca1339ac526649e5699d6b60d06b7c258b1c9b2532ab7f3412a" }, "downloads": -1, "filename": "dmdj-0.4.2.tar.gz", "has_sig": false, "md5_digest": "40697fe05b74ab4b89a0afb3c46d5689", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6157, "upload_time": "2016-09-01T20:23:15", "url": "https://files.pythonhosted.org/packages/f5/f8/6f56830e68e9c056901a83a65cdac47026b0a22a2e606522ab2e66a9f597/dmdj-0.4.2.tar.gz" } ] }