Skip to main content

commons

PyPI version

This repository contains the code supporting several HuBMAP restful microservices.

Getting Started

The hubmap commons library is available through PyPi via the command:

pip install hubmap-commons

The hubmap-commons requirements can be found here

Contents

The code includes:

  • activity.py (deprecated) creates Cyhper statements for creating and getting HuBMAP Activitiy node types

  • autherror.py a class to handle authentiation errors

  • entity.py(deprecated) a base class that executes many Cypher queries against Neo4j to return information about the HuBMAP Entity nodes

  • file_helper.py contains methods to execute files and parse files

  • globus_file_helper.py contains methods for creating Globus directories

  • hm_auth.py contains several methods and classes relating to system security

  • hubmap_const.py a file that maintains the names and strings used in the code and the Neo4j system

  • neo4j_connection.py(deprecated) provides connections to Neo4j and some generic Cypher statements (e.g. CREATE and UPDATE)

  • neo4j_driver.py creates a neo4j.Driver singleton instance

  • provenance.py(deprecated) extracts provenance related information from a token

  • schema_tools.py checks a JSON structure vs a schema definition using two main methods.

    • check_json_matches_schema(jsondata, schema_filename: str, base_path: str = "", base_uri: str = "") Checks the given json data against the jsonschema in the given schema file, raising an exception on error. The exception text includes one or more validation error messages.
    • assert_json_matches_schema(jsondata, schema_filename: str, base_path: str = "", base_uri: str = "") Raises AssertionError if the schema in schema_filename is invalid, or if the given jsondata does not match the schema.
  • stirng_helper.py contains several string related functions (listToCommaSeparated, getYesNo, etc.)

  • test_ws.py contains a test Web Service. This service can be run by copying hubmap_commons/common_app.conf.example to hubmap_commons/common_app.conf and providing a Globus client id and secret (available at https://developers.globus.org) then directly running test_ws.py from the hubmap_commons/ directory. The service has a useful /login method that can be used to generate Globus auth tokens for testing. Note: For much of HuBMAP a Globus "nexus" token used to access the globus Nexus APIs. To generate a nexus token the Client ID must be authorized for this. Client IDs are available from the developers of this repository to generate nexus tokens for use against HuBMAP APIs.

  • uuid_generator.py(deprecated) this is a wrapper for calls to the /hmuuid Web Service

  • type_cliet.py(deprecated and removed) provides a singleton client for retrieving information about different assay types

Metadata

Release files for hubmap-commons 2.1.28

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hubmap-commons 2.1.28
File Size Uploaded Provenance Actions
hubmap_commons-2.1.28.tar.gz 63.9 kB Without provenance Details for hubmap_commons-2.1.28.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hubmap-commons 2.1.28
File Interpreter ABI Platform Actions
hubmap_commons-2.1.28-py3-none-any.whl Python 3 none any Details for hubmap_commons-2.1.28-py3-none-any.whl

Total release size: 133.1 kB

Release files / hubmap_commons-2.1.28.tar.gz

Download URL hubmap_commons-2.1.28.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6c4e3f6bb94d413fa151844e641d37e34b10f33b38473ad11f8525f56621ac63
BLAKE2b-256 checksum
How to use checksums
cb1543841f5df49bd055de1c3a8c93d8fe83d2ef62eacbecf9249c33d7d3d6cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / hubmap_commons-2.1.28-py3-none-any.whl

Download URL hubmap_commons-2.1.28-py3-none-any.whl
Size 69.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33bd38e0afc9bff9a02e2bf5e58c131a69d1857b377106ffb033ace384126ea8
BLAKE2b-256 checksum
How to use checksums
9a6f10be580dad89dbb04d8af5447089c63ef506a96eacd2eb8ccf3b469259ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Security for hubmap-commons 2.1.28

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.

Release history Release notifications | RSS feed

This release

2.1.28 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page