Skip to main content

A BRAPI server instance that functions as a proxy for endpoints from existing BRAPI services

Project description

BrAPI proxy solution

A BRAPI server instance that functions as a proxy for endpoints from existing BRAPI services.

Installation

  • Step 1: Install BrAPI Proxy
    • To install the BRAPI Proxy, run the following command:
      pip install brapi_proxy
      
  • 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
      

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
      

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=::
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brapi_proxy-0.0.2.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

brapi_proxy-0.0.2-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file brapi_proxy-0.0.2.tar.gz.

File metadata

  • Download URL: brapi_proxy-0.0.2.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.4

File hashes

Hashes for brapi_proxy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f73a92f725e676f355f07aa2f9609f879ef0863eef879c7cde090bc814fb4f1c
MD5 0e24ffb2c505a680889927445856e89c
BLAKE2b-256 303bd18c56e9cf34e84bf84b9e9a987b6544bef6e2a7b1c0cdfd7807e9492fd7

See more details on using hashes here.

File details

Details for the file brapi_proxy-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: brapi_proxy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.4

File hashes

Hashes for brapi_proxy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1eea76407f328443e681459ed1960162406f388033cbc17f2632c2ef224867
MD5 3e00c0851d1291290c2ee003861c2649
BLAKE2b-256 8f9c82e8db80398183dc375f35821bb513a45c29b3df11baa3cea70c3c49e379

See more details on using hashes here.

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