datamodelutils
Wrapper utils to allow gen3datamodel.models to be loaded after initialization.
For example
from datamodelutils import models
from dictionaryutils import DataDictionary, dictionary
d = DataDictionary(url="https://s3.amazonaws.com/dictionary-artifacts/bhcdictionary/feat/s3/schema.json")
dictionary.init(d)
# Always import gen3datamodel after dictionary has been initialized.
# Creates a singleton for life of python session.
# Required for backward compatibility.
from gen3datamodel import models as md
models.init(md)
print(models)
will produce output of
<module 'gen3datamodel.models' from '/Users/phillis/Documents/work/datamodelutils/venv/lib/python3.9/site-packages/gen3datamodel/gen3datamodel/models/__init__.py'>
CLI Utilities
datamodel_postgres_admin
Script to do database creation and migration
# setup all tables, this should be run when you initialize the database
> export PG_HOST=localhost
> export PG_USER=test
> export PG_PASS=test
> export PG_NAME=test_graph
> export DICTIONARY_URL="https://s3.amazonaws.com/dictionary-artifacts/<dictionary_repl>/<branch>/schema.json"
> datamodel_postgres_admin create-all
# setup/create new graph tables, this should be run for dictionary migrations that needs to setup new tables
datamodel_postgres_admin graph-create
datamodel_repl
repl to interact with datamodel
> export PG_HOST=localhost
> export PG_USER=test
> export PG_PASS=test
> export PG_NAME=test_graph
> export DICTIONARY_URL="https://s3.amazonaws.com/dictionary-artifacts/<dictionary_repl>/<branch>/schema.json"
> datamodel_repl
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
Type "copyright", "credits" or "license" for more information.
IPython 5.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: g.nodes(md.Project).first()
Out[1]: <Project(a77f549b-c74b-563e-80bb-570b5a4dde88)>
Metadata
Release files for datamodelutils 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datamodelutils-1.2.0.tar.gz | 10.4 kB | Without provenance | Details for datamodelutils-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datamodelutils-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for datamodelutils-1.2.0-py3-none-any.whl |
Total release size: 23.3 kB
Release files / datamodelutils-1.2.0.tar.gz
| Download URL | datamodelutils-1.2.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af43c0d44a23fab94334b9cde79b8689ae00f1531c5923637e49036e7e20c079
|
|
BLAKE2b-256 checksum How to use checksums |
80d4367f9e6b7fc1140756638fb72e30ba2e7ffa97df74a71cc4fd86ed8bbbff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Release files / datamodelutils-1.2.0-py3-none-any.whl
| Download URL | datamodelutils-1.2.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2829058cfb084b7c23d372f386e13090f11a7f4104a01fd21b2261d14d574b5
|
|
BLAKE2b-256 checksum How to use checksums |
2fcb62c83cccb84247dae67128b6e9f53622b3b76179208c222dfdfc5452f6cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Security for datamodelutils 1.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.