A set of common utilities and helpers for Bento platform services.
Project description
Bento Library (for Python Bento microservices)
Common utilities and helpers for Bento platform services.
Running Tests
python3 -m tox
Releasing
1. Release Checklist
-
All tests pass and test coverage has not been reduced
-
Package version has been updated (following semver) in
bento_lib/package.cfg -
The latest changes have been merged from the
developbranch into themasterbranch -
A release has been created, tagged in the format of
v#.#.#and named in the format ofVersion #.#.#, listing any changes made, in the GitHub releases page tagged from the master branch!
2. Releasing from the Command Line
# IF NECESSARY: Install twine OUTSIDE of the virtual environment
python3 -m pip install twine
# Switch to the correct branch and make sure it's up to date
git checkout master
git pull
# If needed, enter the project virtual environment
source env/bin/activate
# Remove existing build files
rm -rf build/ dist/ bento_lib.egg-info/
# Build the new package
python3 setup.py sdist bdist_wheel
# In between these steps - test out the package... make sure everyhting works
# before uploading it to production PyPI.
# Upload it to PyPI
twine upload dist/*
Modules
auth
auth provides Python service decorators and Django / DRF backends for dealing
with the Bento container authentication headers (derived from
lua-resty-openidc, set by the internal container NGINX instance.)
events
events facilitates JSON-serialized message-passing between Bento
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 Bento channels are prefixed with bento..
ingestion
ingestion contains common code used for handling ingestion routines in
different Bento data services.
schemas
schemas contains common JSON schemas which may be useful to a variety of
different Bento services.
schemas.bento contains Bento-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 Bento, as well as a transpiler to the psycopg2 PostgreSQL IR.
The query syntax for Bento 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 Bento 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 Bento query syntax to the
psycopg2-provided
intermediate representation (IR) for
PostgreSQL, allowing safe queries against a Postgres database.
search.queries provides definitions for the Bento query AST and some helper
methods for creating and processing ASTs.
utils
utils contains miscellaneous utilities commonly required by Bento services.
workflows
workflows contains common code used for handling workflow metadata processing
and response generation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
File details
Details for the file bento_lib-1.0.0.tar.gz.
File metadata
- Download URL: bento_lib-1.0.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1492720517a7180b337341f3b17b69466469a027f402ddd09bfa8038869a361c
|
|
| MD5 |
96039db7c2b8b233f9f5a40f4829b12d
|
|
| BLAKE2b-256 |
d2ec283715dd42467711411c9b8b8795d8f39ab33e7a455edde63ce89d260163
|
File details
Details for the file bento_lib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bento_lib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f89fde6064778684b7add86a8d8c072f3020b3c86678276112890994cb670ba1
|
|
| MD5 |
6694e9cdd3e09d4af865193bdf98730e
|
|
| BLAKE2b-256 |
7d665429d25c0b74163b18e08e26d7ad5dc27a51f1bc0ee07a3ab92ab837010f
|