Skip to main content

A set of common utilities and helpers for CHORD.

Project description

CHORD Library (for Python CHORD microservices)

Build Status codecov PyPI version

Common utilities and helpers for CHORD services.

Running Tests

python3 -m pytest --cov=chord_lib --cov-branch

Modules

auth

auth provides Python service decorators and Django / DRF backends for dealing with the CHORD container authentication headers (derived from lua-resty-openidc, set by the internal container NGINX instance.)

events

events facilitates JSON-serialized message-passing between CHORD microservices. Serialized objects can be at most 512 MB.

Events should have a lower-case type which is type-insensitively unique and adequately describes the associated data.

All CHORD channels are prefixed with chord..

ingestion

ingestion contains common code used for handling ingestion routines in different CHORD data services.

schemas

schemas contains common JSON schemas which may be useful to a variety of different CHORD services.

schemas.chord contains CHORD-specific schemas, and schemas.ga4gh contains GA4GH-standardized schemas (possibly not exactly to spec.)

search

search contains definitions, validators, and transformations for the query syntax for CHORD, as well as a transpiler to the psycopg2 PostgreSQL IR.

The query syntax for CHORD takes advantage of JSON schemas augmented with additional properties about the field's accessibility and, in the case of Postgres, how the field maps to a table column (or JSON column sub-field.)

search.data_structure contains code for evaluating a CHORD query against a Python data structure.

search.operations contains constants representing valid search operations one can allow against particular fields from within an augmented JSON schema.

search.postgres contains a "transpiler" from the CHORD query syntax to the psycopg2-provided intermediate representation (IR) for PostgreSQL, allowing safe queries against a Postgres database.

search.queries provides definitions for the CHORD query AST and some helper methods for creating and processing ASTs.

utils

utils contains miscellaneous utilities commonly required by CHORD services.

workflows

workflows contains common code used for handling workflow metadata processing and response generation.

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

chord_lib-0.4.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chord_lib-0.4.0-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file chord_lib-0.4.0.tar.gz.

File metadata

  • Download URL: chord_lib-0.4.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for chord_lib-0.4.0.tar.gz
Algorithm Hash digest
SHA256 28078047fa2d512736c06c64ab0dbc2afe7d5e0b75b8661b10a0dde46220af69
MD5 869a65e08c9bfcf3d10fc9c959e81c65
BLAKE2b-256 079054d7d6110cbf9fc5fa9e2c5be20bf82f53c8fb71e587d276b03781ae6c3f

See more details on using hashes here.

File details

Details for the file chord_lib-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: chord_lib-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for chord_lib-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd02d4991c3efe311284cb2e50d12de82d41ebd9d6029157e760fa33080ef2b
MD5 e9991269e0ce5e80dac9a7bd8b7f4cc3
BLAKE2b-256 2ca9074e418c9f815bb40dba638bfae71f09ba4b33a9de54d7454ef09094e840

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page