Skip to content

Python API samples

module pephubclient.modules.sample

  • PEPHUB_SAMPLE_URL

Class for managing samples in PEPhub and provides methods for getting, creating, updating and removing samples. This class is not related to peppy.Sample class.

__init__(jwt_data: str = None)
  • :param jwt_data: jwt token for authorization

create(
namespace: str,
name: str,
tag: str,
sample_name: str,
sample_dict: dict,
overwrite: bool = False
) → None

Create sample in project in PEPhub.

  • :param namespace: namespace of project
  • :param name: name of project
  • :param tag: tag of project
  • :param sample_dict: sample dict
  • :param sample_name: sample name
  • :param overwrite: overwrite sample if it exists :return: None

get(namespace: str, name: str, tag: str, sample_name: str = None) → dict

Get sample from project in PEPhub.

  • :param namespace: namespace of project
  • :param name: name of project
  • :param tag: tag of project
  • :param sample_name: sample name :return: Sample object

remove(namespace: str, name: str, tag: str, sample_name: str)

Remove sample from project in PEPhub.

  • :param namespace: namespace of project
  • :param name: name of project
  • :param tag: tag of project
  • :param sample_name: sample name :return: None

update(namespace: str, name: str, tag: str, sample_name: str, sample_dict: dict)

Update sample in project in PEPhub.

  • :param namespace: namespace of project
  • :param name: name of project
  • :param tag: tag of project
  • :param sample_name: sample name
  • :param sample_dict: sample dict, that contain elements to update, or :return: None

This file was automatically generated via lazydocs.