Skip to content

REST API client library for accessing Mykrobe Atlas distance API

Notifications You must be signed in to change notification settings

Mykrobe-tools/mykrobe-atlas-distance-client

Repository files navigation

distance_client

An API for CRUD of two types of distances

  • between a sample and its closest samples
  • between a sample and its closest phylogenetic tree node

    This API is intended to satisfy the following user stories

  • as a user, I want to add my new sample and its close neighbours so that I can retrieve them later
  • as a user, I want to query a sample for its close neighbours and their nearest nodes in a phylogenetic tree
  • as a user, I want to query a sample for its close neighbours so that I can do my analysis
  • as a user, I want to query a sample for its nearest node in a phylogenetic tree so that I can do my analysis
  • as a user, I want to update a sample with new list of close neighbours so that they are correct
  • as a user, I want to update a sample with new nearest leaf node in a phylogenetic tree so that it is correct
  • as a user, I want to remove the nearest leaf node in a phylogenetic tree from a sample so that it is correct
  • as a user, I want to remove a sample so that it is no longer available to any users
  • as a user, I want to add a new leaf node to the phylogenetic tree
  • as a user, I want to remove a leaf node from the phylogenetic tree
  • as a user, I want to query a tree node for a list of samples which have this as nearest tree node

    This Python package is automatically generated by the OpenAPI Generator project:

    • API version: 1.0.0
    • Package version: 1.0.0
    • Build package: org.openapitools.codegen.languages.PythonClientCodegen

    Requirements.

    Python 2.7 and 3.4+

    Installation & Usage

    pip install

    If the python package is hosted on a repository, you can install directly using:

    pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

    (you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

    Then import the package:

    import distance_client 

    Setuptools

    Install via Setuptools.

    python setup.py install --user

    (or sudo python setup.py install to install the package for all users)

    Then import the package:

    import distance_client

    Getting Started

    Please follow the installation procedure and then run the following:

    from __future__ import print_function
    import time
    import distance_client
    from distance_client.rest import ApiException
    from pprint import pprint
    
    
    # Defining host is optional and default to http://distance-api-service/api/v1
    configuration.host = "http://distance-api-service/api/v1"
    # Create an instance of the API class
    api_instance = distance_client.LeafDeleteApi(distance_client.ApiClient(configuration))
    id = 'id_example' # str | 
    
    try:
        api_instance.samples_id_nearest_leaf_node_delete(id)
    except ApiException as e:
        print("Exception when calling LeafDeleteApi->samples_id_nearest_leaf_node_delete: %s\n" % e)

    Documentation for API Endpoints

    All URIs are relative to http://distance-api-service/api/v1

    Class Method HTTP request Description
    LeafDeleteApi samples_id_nearest_leaf_node_delete DELETE /samples/{id}/nearest-leaf-node
    LeafGetApi samples_id_nearest_leaf_node_get GET /samples/{id}/nearest-leaf-node
    LeafPutApi samples_id_nearest_leaf_node_put PUT /samples/{id}/nearest-leaf-node
    NeighboursGetApi samples_id_nearest_neighbours_get GET /samples/{id}/nearest-neighbours
    NeighboursPutApi samples_id_nearest_neighbours_put PUT /samples/{id}/nearest-neighbours
    SamplesDeleteApi samples_id_delete DELETE /samples/{id}
    SamplesGetApi samples_id_get GET /samples/{id}
    SamplesGetIdsApi samples_get GET /samples
    SamplesPatchApi samples_id_patch PATCH /samples/{id}
    SamplesPostApi samples_post POST /samples
    TreeDeleteApi tree_id_delete DELETE /tree/{id}
    TreeGetApi tree_id_get GET /tree/{id}
    TreePostApi tree_post POST /tree
    TreeSamplesGetApi tree_id_samples_get GET /tree/{id}/samples

    Documentation For Models

    Documentation For Authorization

    All endpoints do not require authorization.

    Author

  • About

    REST API client library for accessing Mykrobe Atlas distance API

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published