All Projects → sbg → sevenbridges-python

sbg / sevenbridges-python

Licence: Apache-2.0 license
SevenBridges Python Api bindings

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sevenbridges-python

RESTEasy
REST API calls made easier
Stars: ✭ 12 (-70.73%)
Mutual labels:  api-client, rest-client
Apipie
Transform api declaration to js object for frontend. Inspired by VueRouter, koa-middleware and axios.
Stars: ✭ 29 (-29.27%)
Mutual labels:  api-client, rest-client
radiobrowser4j
RadioBrowser Java API library
Stars: ✭ 30 (-26.83%)
Mutual labels:  api-client, rest-client
Taviloglu.Wrike.ApiClient
.NET Client for Wrike API
Stars: ✭ 24 (-41.46%)
Mutual labels:  api-client, rest-client
drowsy
😪 Lazy integrations tool for RESTful interfaces to aid POC development and streamline integrations
Stars: ✭ 19 (-53.66%)
Mutual labels:  api-client, rest-client
bitrix
Bitrix24 REST API client that doesn't suck. Suffer no more.
Stars: ✭ 59 (+43.9%)
Mutual labels:  api-client, rest-client
Datafire
A framework for building integrations and APIs
Stars: ✭ 487 (+1087.8%)
Mutual labels:  api-client, rest-client
apiron
🍳 apiron is a Python package that helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.
Stars: ✭ 106 (+158.54%)
Mutual labels:  api-client, rest-client
Parse Dashboard For Ios
A beautiful mobile client for managing your Parse apps while you are on the go! Now you can easily view and modify your data in the same way you would on the offical desktop client.
Stars: ✭ 81 (+97.56%)
Mutual labels:  api-client, rest-client
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+25836.59%)
Mutual labels:  api-client, rest-client
Apiclientcodegen
A collection of Visual Studio custom tool code generators for Swagger / OpenAPI specification files
Stars: ✭ 50 (+21.95%)
Mutual labels:  api-client, rest-client
NClient
💫 NClient is an automatic type-safe .Net HTTP client that allows you to call web service API methods using annotated interfaces or controllers without boilerplate code.
Stars: ✭ 25 (-39.02%)
Mutual labels:  api-client, rest-client
YuiAPI
一个浏览器API测试客户端,API文档生成器,支持chrome/firefox/新版edge
Stars: ✭ 25 (-39.02%)
Mutual labels:  api-client, rest-client
restofus
Restofus - a cross-platform (REST) API client.
Stars: ✭ 18 (-56.1%)
Mutual labels:  api-client, rest-client
fs-pochta-api
Библиотека для работы с API Почты России
Stars: ✭ 15 (-63.41%)
Mutual labels:  api-client
Rx.Http
A reactive way to make HTTP Request in .NET Core 🚀
Stars: ✭ 62 (+51.22%)
Mutual labels:  rest-client
clickupython
A client for working with the ClickUp API V2
Stars: ✭ 30 (-26.83%)
Mutual labels:  api-client
restler
Restler is a beautiful and powerful Android app for quickly testing REST API anywhere and anytime.
Stars: ✭ 120 (+192.68%)
Mutual labels:  rest-client
chess.com
Python wrapper for Chess.com Published-Data API
Stars: ✭ 34 (-17.07%)
Mutual labels:  api-client
fb-messenger-bot-api
NodeJS Facebook Messenger API for bots to send messages and setup events to Facebook.
Stars: ✭ 29 (-29.27%)
Mutual labels:  api-client

sevenbridges-python

PyPI version Documentation Licence

CHANGELOG

sevenbridges-python is a Python library that provides an interface for the Seven Bridges Platform the Cancer Genomics Cloud and Cavatica public APIs. It works with Python versions 3.6+.

The Seven Bridges Platform is a cloud-based environment for conducting bioinformatic analyses. It is a central hub for teams to store, analyze, and jointly interpret their bioinformatic data. The Platform co-locates analysis pipelines alongside the largest genomic datasets to optimize processing, allocating storage and compute resources on demand.

The The Cancer Genomics Cloud (CGC), powered by Seven Bridges, is also a cloud-based computation environment. It was built as one of three pilot systems funded by the National Cancer Institute to explore the paradigm of colocalizing massive genomics datasets, like The Cancer Genomics Atlas (TCGA), alongside secure and scalable computational resources to analyze them. The CGC makes more than a petabyte of multi-dimensional data available immediately to authorized researchers. You can add your own data to analyze alongside TCGA using predefined analytical workflows or your own tools.

The Cavatica, powered by Seven Bridges, is a data analysis and sharing platform designed to accelerate discovery in a scalable, cloud-based compute environment where data, results, and workflows are shared among the world's research community. Cavatica is built in collaboration with the Children Hospital of Philadelphia and it is focused on pediatric data.

Documentation

The latest documentation can be found on readthedocs.

Installation

The easiest way to install sevenbridges-python is using pip:

$ pip install sevenbridges-python

Get the Code

sevenbridges-python is actively developed on GitHub, where the code is always available.

The easiest way to obtain the source is to clone the public repository :

$ git clone git://github.com/sbg/sevenbridges-python.git

Once you have a copy of the source, you can embed it in your Python package, or install it into your site-packages by invoking: :

$ python setup.py install

If you are interested in reviewing this documentation locally, clone this repository, position yourself in the docs directory and after installing requirements-dev.txt, invoke:

$ make html

Run Tests

In order to run tests clone this repository, position yourself in the root of the cloned project and after installing requirements-dev.txt, invoke:

$ pytest

Authentication and Configuration

In order to authenticate with the API, you should pass the following items to sevenbridges-python:

(a) Your authentication token (b) The API endpoint you will be interacting with. This is either the endpoint for the Seven Bridges Platform or for the Seven Bridges Cancer Genomics Cloud (CGC) or for CAVATICA.

You can find your authentication token on the respective pages:

The API endpoints for each environment are:

For more information about the API, including details of the available parameters for each API call, you should check the API documentation before using this library:

Initialize configuration using the configuration file

Once you obtain your authentication token, you can pass it to the Config object. You can instantiate the API object by passing the appropriate configuration. There are three ways you can pass configure the library:

  1. Pass parameters url and token explicitly when initializing the config object.
  2. Put the API endpoint and token in the environment variables API_URL and AUTH_TOKEN respectively.
  3. Use the configuration file $HOME/.sevenbridges/credentials with defined parameters.

Explicit initialization

import sevenbridges as sbg
api = sbg.Api(url='https://api.sbgenomics.com/v2', token='<TOKEN_HERE>')

Initialization via environment variables

import os
import sevenbridges as sbg

# Usually these would be set in the shell beforehand
os.environ['SB_API_ENDPOINT'] = 'https://api.sbgenomics.com/v2'
os.environ['SB_AUTH_TOKEN'] = '<TOKEN_HERE>'

api = sbg.Api()

Initialization via config file

import sevenbridges as sbg
config = sbg.Config(profile='cgc')
api = sbg.Api(config=config)

Notes on config file format

The $HOME/.sevenbridges/credentials file has a simple .ini file format, for example:

[default]
api_endpoint = https://api.sbgenomics.com/v2
auth_token = <TOKEN_HERE>

[cgc]
api_endpoint = https://cgc-api.sbgenomics.com/v2
auth_token = <TOKEN_HERE>

[cavatica]
api_endpoint = https://cavatica-api.sbgenomics.com/v2
auth_token = <TOKEN_HERE>

Initializing the sevenbridges-python library

The API object represents the central resource for querying, saving and performing all other actions on your resources. Once you have instantiated the configuration class, pass it to the API class constructor.

import sevenbridges as sbg
api_config = sbg.Config()  # Or any other choice of initialization method
api = sbg.Api(config=api_config)

Examples

The following code illustrates the way the library should be used. For more detailed examples consult the documentation, hosted on readthedocs.

import sevenbridges as sbg

api_config = sbg.Config()  # Or any other choice of initialization method
api = sbg.Api(config=api_config)

# Get current user
user = api.users.me()

# Query your projects
projects = api.projects.query(limit=100)

# Fetch project files
project = projects[0]
files = project.get_files()

Contributing

Contributions, bug reports and issues are very welcome.

You can make your own contributions by forking the develop branch of this repository, making your changes, and issuing pull request on the develop branch. Contributors should read the Seven Bridges Notice to Contributors and sign the Seven Bridges Contributor Agreement before submitting a pull request.

Copyright

Copyright (c) 2020 Seven Bridges Genomics, Inc. All rights reserved.

This project is open-source via the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].