A BRAPI server instance that functions as a proxy to merge and combine endpoints from existing BRAPI services
Project description
BrAPI proxy solution
A BrAPI server instance that functions as a proxy to merge and combine endpoints from existing BrAPI services.
Installation
- Step 1: Install BrAPI Proxy
- To install the BrAPI Proxy, run the following command:
pip install brapi_proxy
- To install the BrAPI Proxy, run the following command:
- Step 2: Test the Installation (Optional)
- To ensure that the installation was successful, you can run the BrAPI Proxy in demo mode with the following command:
brapi_proxy --demo
This will start a service on port 8080 from a configuration based on the BrAPI Test Server
- To ensure that the installation was successful, you can run the BrAPI Proxy in demo mode with the following command:
Usage
-
Step 1: Create Configuration File
- Create a file named config.ini.
- Populate this file with the necessary configuration settings.
-
Step 2: Start the Service
- Start the service by running the command:
brapi_proxy
- If the config.ini file is located outside the working directory, use the --config option to specify its location. For example:
brapi_proxy --config /path/to/config.ini
- Start the service by running the command:
Currently Supported
BrAPI Versions
- version 2.1
Endpoints
- BrAPI-Core
- /commoncropnames
- /studies
- /studies/{studyDbId}
- BrAPI-Genotyping
- /callsets
- /callsets/{callSetDbId}
- /variants
- /variants/{variantDbId}
- /variantsets
- /variantsets/{variantSetDbId}
- /plates
- /plates/{plateDbId}
- /samples
- /samples/{sampleDbId}
- /references
- /references/{referenceDbId}
- /referencesets
- /referencesets/{referenceSetDbId}
- /allelematrix
ToDo
- Implement additional endpoints
- Enable authentication for underlying servers
Structure Configuration File
Create a config.ini
file with the necessary configuration settings.
Basic Configuration
Include at least the brapi
section:
[brapi]
port=8080
host=0.0.0.0
location=/
threads=4
debug=False
version=2.1
Optional: Authorization
Optionally, provide authentication tokens to restrict access in the authorization
section:
[authorization]
john=tokenjohn123abc
mary=tokenmary456def
Server Definitions
Within sections prefixed with server.
, define the underlying servers:
[server.test1]
url=https://test-server.brapi.org/brapi/v2
calls=commoncropnames,variants,allelematrix
prefix.variants=barley:
prefix.variantsets=barley:
prefix.references=barley:
prefix.referencesets=barley:
prefix.callsets=barley:
[server.test2]
url=https://test-server.brapi.org/brapi/v2
calls=commoncropnames,variants,allelematrix
prefix.variants=wheat:
prefix.variantsets=wheat:
prefix.references=wheat:
prefix.referencesets=wheat:
prefix.callsets=wheat:
[server.test3]
url=https://test-server.brapi.org/brapi/v2
calls=samples,studies,plates,callsets,variantsets,referencesets,references
This software has been developed for the AGENT project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file brapi_proxy-0.0.6.tar.gz
.
File metadata
- Download URL: brapi_proxy-0.0.6.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156a4d8d66f302e1c736959e43fd2648a33bd98d9bff1f913a6bfac52ee8cb87 |
|
MD5 | 50f70476b190077a1e1f5ff9eac2630e |
|
BLAKE2b-256 | d7e60f7160b7608f7957e1d76485456b78f1040d4312a7cac3623c9e4bcd4df1 |
File details
Details for the file brapi_proxy-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: brapi_proxy-0.0.6-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112afd37ea5b78f367817d01a0a200684747883901bf46ac89988190f5046355 |
|
MD5 | fb672dd4929e139ff83f50ab7669f0ff |
|
BLAKE2b-256 | 70500fc5f7b0c76fc51083bd9021510c90948670e2adf91abf4b3077e90a21b5 |