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

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.26
File Size Uploaded
hubmap_commons-2.1.26.tar.gz 63.9 kB Details

Built distribution (wheel)

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

Total release size: 133.1 kB

Release files / hubmap_commons-2.1.26.tar.gz

Download URL hubmap_commons-2.1.26.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
80f247fc56f16df336ea5dea5e52d6c5c0f846ea37c3bdb97d1aaa515a40b294
BLAKE2b-256 checksum
How to use checksums
6c14f382098e1f1ef2ccdaf3042d97b28523acdf0260c9058d2505c2a04f8f3a
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.26-py3-none-any.whl

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

Release history Release notifications | RSS feed

This release

2.1.26 This release

2 release files

2.1.25

2 release files

2.1.24

2 release files

2.1.23

2 release files

2.1.20

2 release files

2.1.19

2 release files

2.1.18

2 release files

2.1.17

2 release files

2.1.16

2 release files

2.1.15

2 release files

2.1.13

2 release files

2.1.12

2 release files

2.1.10

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.15

2 release files

2.0.14

2 release files

2.0.13

2 release files

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