Django models for chop-dbhi/data-models-service style JSON endpoints.
Project description
# Data Models Django
[](https://circleci.com/gh/chop-dbhi/data-models-django/tree/master) [](https://coveralls.io/github/chop-dbhi/data-models-django?branch=master)
Django models for [chop-dbhi/data-models-service](https://github.com/chop-dbhi/data-models-service) style JSON endpoints.
## Django Model Usage
In your shell, hopefully within a virtualenv:
```sh
pip install dmdj
```
In python:
```python
from dmdj.omop.v5_0_0.models import Person
print Person._meta.fields
```
These models are dynamically generated at runtime from JSON endpoints provided by chop-dbhi/data-models-service, which reads data stored in chop-dbhi/data-models. Each data model version available on the service is included in a dynamically generated python module. At the time of writing, the following are available. Any added to the service will use the same naming conventions.
- **OMOP V4** at `omop.v4_0_0.models`
- **OMOP V5** at `omop.v5_0_0.models`
- **PEDSnet V1** at `pedsnet.v1_0_0.models`
- **PEDSnet V2** at `pedsnet.v2_0_0.models`
- **i2b2 V1.7** at `i2b2.v1_7_0.models`
- **i2b2 PEDSnet V2** at `i2b2_pedsnet.v2_0_0.models`
- **PCORnet V1** at `pcornet.v1_0_0.models`
- **PCORnet V2** at `pcornet.v2_0_0.models`
- **PCORnet V3** at `pcornet.v3_0_0.models`
### Caveats
- This package is **not** a Django "app" and it cannot be included in your Django project `INSTALLED_APPS`. Neither can any of the dynamically created modules (like `pedsnet.v2_0_0`).
- The models are associated with a fictional Django `app_label` when they are dynamically created, so they will not be included in any Django sql output or migration commands. If you would like to explicitly include the models in your app or project, use code similar to the `version_module_code` code block in the [`dmdj/__init__.py`](dmdj/__init__.py) file to re-generate models with your app's `app_label` at runtime.
- The models are dynamically generated and may change over time, although efforts to improve the semantic versioning and stability practices in the data-models repo are under way.
- No attempt is made to provide migrations for any changes that do occur over time.
[](https://circleci.com/gh/chop-dbhi/data-models-django/tree/master) [](https://coveralls.io/github/chop-dbhi/data-models-django?branch=master)
Django models for [chop-dbhi/data-models-service](https://github.com/chop-dbhi/data-models-service) style JSON endpoints.
## Django Model Usage
In your shell, hopefully within a virtualenv:
```sh
pip install dmdj
```
In python:
```python
from dmdj.omop.v5_0_0.models import Person
print Person._meta.fields
```
These models are dynamically generated at runtime from JSON endpoints provided by chop-dbhi/data-models-service, which reads data stored in chop-dbhi/data-models. Each data model version available on the service is included in a dynamically generated python module. At the time of writing, the following are available. Any added to the service will use the same naming conventions.
- **OMOP V4** at `omop.v4_0_0.models`
- **OMOP V5** at `omop.v5_0_0.models`
- **PEDSnet V1** at `pedsnet.v1_0_0.models`
- **PEDSnet V2** at `pedsnet.v2_0_0.models`
- **i2b2 V1.7** at `i2b2.v1_7_0.models`
- **i2b2 PEDSnet V2** at `i2b2_pedsnet.v2_0_0.models`
- **PCORnet V1** at `pcornet.v1_0_0.models`
- **PCORnet V2** at `pcornet.v2_0_0.models`
- **PCORnet V3** at `pcornet.v3_0_0.models`
### Caveats
- This package is **not** a Django "app" and it cannot be included in your Django project `INSTALLED_APPS`. Neither can any of the dynamically created modules (like `pedsnet.v2_0_0`).
- The models are associated with a fictional Django `app_label` when they are dynamically created, so they will not be included in any Django sql output or migration commands. If you would like to explicitly include the models in your app or project, use code similar to the `version_module_code` code block in the [`dmdj/__init__.py`](dmdj/__init__.py) file to re-generate models with your app's `app_label` at runtime.
- The models are dynamically generated and may change over time, although efforts to improve the semantic versioning and stability practices in the data-models repo are under way.
- No attempt is made to provide migrations for any changes that do occur over time.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dmdj-0.3.5.tar.gz
(7.8 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dmdj-0.3.5-py2.7.egg
(19.8 kB
view details)
dmdj-0.3.5-py2-none-any.whl
(11.3 kB
view details)
File details
Details for the file dmdj-0.3.5.tar.gz.
File metadata
- Download URL: dmdj-0.3.5.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25dedb54d28bf437ced19d65e366d6c3565138648f830cac6722c540bb777a7b
|
|
| MD5 |
0c86ac3796a9a387ce80bf4d0b2cde69
|
|
| BLAKE2b-256 |
e35b52890e242e34aaba2bb3094723fb5e6237fbb36d28f766f53aa38d54be62
|
File details
Details for the file dmdj-0.3.5-py2.7.egg.
File metadata
- Download URL: dmdj-0.3.5-py2.7.egg
- Upload date:
- Size: 19.8 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54d84ba8ba9e0769fd649bed560e33830e1d5b00af0a6a447e644fb590e0d69a
|
|
| MD5 |
e802ae6c91561f9cc3854edd4700bc58
|
|
| BLAKE2b-256 |
a9cefdbd8ff3d4c43e7db2415fa3e217be4f7dcb047087319814cd90a534932f
|
File details
Details for the file dmdj-0.3.5-py2-none-any.whl.
File metadata
- Download URL: dmdj-0.3.5-py2-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47e04a14ccb0883806bbe7eefac0a9475bd8bdd1182b2739ae8761cf8281a382
|
|
| MD5 |
2e55bc8da8490a19c375c44b3228914b
|
|
| BLAKE2b-256 |
a9e5fdc13be68707662738b3caaa49b0c13c4b9d278dc4d0bc4aec1046036036
|