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.27

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.27
File Size Uploaded Provenance Actions
hubmap_commons-2.1.27.tar.gz 63.9 kB Without provenance Details for hubmap_commons-2.1.27.tar.gz

Built distribution (wheel)

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

Total release size: 133.1 kB

Release files / hubmap_commons-2.1.27.tar.gz

Download URL hubmap_commons-2.1.27.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b5025397ef7c7bf0dda18bc9318c47ca1053f3b0cff123c82533590b2db1ad1e
BLAKE2b-256 checksum
How to use checksums
9982b15ce41b3fddf63961a8144be26ff9c52f154cc3dc1e73545ecaab362c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

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

Download URL hubmap_commons-2.1.27-py3-none-any.whl
Size 69.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a4e2aec611ed06742e5ef14c0ca575a5c851236532ce85622f3109c77620446
BLAKE2b-256 checksum
How to use checksums
876053e6e88f609c2fa32b8b8857ec20d2c684dd2bca2128a1b830688f82b63d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for hubmap-commons 2.1.27

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.27 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