Skip to main content

Python Client Libary to use HuBMAP web services

Project description

hubmap-sdk


A Python interface to the various HuBMAP web services

Overview

The hubmap sdk is a client library that allows for easy integration of the API's associated with HuBMAP.

Using hubmap-sdk

The hubmap-sdk library is available through PyPi via the command:

pip3 install hubmap-sdk

hubmap-sdk requirements can be found here

Documentation

Documentation and examples can be found here

Building and Publishing hubmap-sdk

SetupTools and Wheel is required to build the sdk distribution. Twine is required to publish to Pypi

Build the distribution directory with:

python3 setup.py sdist bdist_wheel

from within the python-sdk project directory

To publish, from inside the project directory, run:

twine upload dist/*

A prompt to enter login information to the hubmap Pypi account will appear

Files

This code contains:

collection.py Contains the Collection class. This is used for creation and modification of Collection objects.

dataset.py Contains the Dataset class. This is used for creation and modification of Dataset objects.

donor.py Contains the Donor class. This is used for creation and modification of Donor objects.

entity.py Contains the Entity class. This is the base class for the Donor, Dataset, Upload, Collection, and Sample classes

entitysdk.py This file contains the primary methods used to interface with the Entity Api. These methods are part of the EntitySdk class. An instance of this class is needed to use the various methods in this class. For a detailed breakdown of the various methods within entitysdk.py, visit api.docs.hubmapconsortium.org

sample.py Contains the Sample class. This is used for creation and modification of Sample objects.

sdk_helper.py This helper function contains various functions used frequently throughout the sdk. These include make_entity() and make_request()

searchsdk.py This file contains the primary methods used to interface with the Search Api. These methods are part of the EntitySdk class. An instance of this class is needed to use the various methods in this class. For a detailed breakdown of the various methods within searchsdk.py, visit api.docs.hubmapconsortium.org

upload.py Contains the Upload class. This is used for creation and modification of Upload objects.

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

hubmap-sdk-1.0.3.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

hubmap_sdk-1.0.3-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

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