Installation of the basepair Python package and associated command line interface (CLI). An outline of the contents on this page:
1. Installation
2. Configuration
1. Installation
Requirements
Python version 3. We no longer actively support python 2.
You need to first install the basepair Python package.
pip install basepair
Once you have it installed, the “basepair” tool should now be available at the command line. Try running the following in your terminal:
basepair -h
2. Configuration
You need to obtain your configuration file to connect to Basepair’s API. To obtain the file:
- Go to your Basepair dashboard: https://app.basepairtech.com
- Click on your profile name in the top right corner
- Click on "Profile"
- Click on "Download API config file" in the upper right corner
When you get your configuration file it should look like the following:
{
"api": {
"cli": true,
"host": "app.basepairtech.com",
"prefix": "/api/v2/",
"ssl": true,
"username": "[email protected]",
"key": ""
}
}
The "key" is a unique code that allows you to access your Basepair account.
To make this file available to your API calls, you can do one of the following:
Option 1: Define an environment variable
export BP_CONFIG_FILE=/path/to/basepair.config.json
Option 2: Give it as a parameter when calling basepair
basepair -c /path/to/basepair.config.json
You can now use Basepair's suite of genomics tools from the command line or through the python API. For usage instructions, see the "Command Line API" or "Python API" tutorials.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article