For programmatic upload of files to Cellencis
Project description
\n# biomage-programmatic-interface
About
This python package provides an easy way to create projects and upload samples into Biomage.
Installation
To install the package execute the following line:
pip install biomage-programmatic-interface
Usage
In order to use the package you first need to create an account in Biomage (https://scp.biomage.net/) if you don't have one yet.
Then the package is used in the following way:
import biomage_programmatic_interface as bpi
# 1. Authenticate user and create a connection tunnel with the api
# Default instance-url: https://api.scp.biomage.net/
connection = bpi.Connection('email', 'password', 'instance_url')
# 2. Create an experiment
experiment = connection.create_experiment('experiment name')
# 3. Upload samples associated with the experiment
experiment.upload_samples('local/path/to/samples')
Once the upload is complete you can navigate to Biomage and process your project there.
Connection
class
The object accepts 3 parameters:
email
- Biomage emailpassword
- Biomage passwordinstance_url
- Biomage instance url
- Copy the url of the Biomage instance excluding
https://
- If the url is https://scp.biomage.net/ enter just the domain name:
scp.biomage.net
Development
If you cloned the repository and want to try using your local version, do the following:
- Install the local version of the pip package:
cd programmatic_interface
make install
- Now you can import the package and use your local version
import biomage_programmatic_interface as bpi
NOTE: There is NO need to run make install
every time you make changes to the package. When the local changes have been saved the changes will be automatically reflected.
Running with local instance of Cellenics
When creating the connection
object set the instance_url
to local
. Now the programmatic interface will use your local api (https://localhost:3000)
import biomage_programmatic_interface as bpi
conn = bpi.Connection(<YOUR EMAIL>, <YOUR PASSWORD>, 'local')
...
Running with staged environment
Set the full path of the instance url (e.g. https://api-{ENVIRONMENT NAME}.scp-staging.biomage.net/
)
import biomage_programmatic_interface as bpi
conn = bpi.Connection(<YOUR EMAIL>, <YOUR PASSWORD>, 'https://api-{ENVIRONMENT NAME}.scp-staging.biomage.net/')
...
NOTE: the url is that of the api (i.e. api-
) and not that of the ui
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
Hashes for biomage_programmatic_interface-0.0.25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f85a9b4fa863c0062bdc471190ff375f2054bafc3c6fb60c862665cb242cde7 |
|
MD5 | f0f3f1234806bcc1d6198c6a4ca4b7ee |
|
BLAKE2b-256 | a3a4bb059b470a634a7642834350226225fa4b9e3bd916f527a12c7e187c6f01 |
Hashes for biomage_programmatic_interface-0.0.25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b08c6dd4d60079c90ba8bcb88dd564941307bc181ababe43063ca1a64a4af5c6 |
|
MD5 | 1634711c514bcdc10bff248990b9fb26 |
|
BLAKE2b-256 | edee5e4b3a88edb779cac011009c7f9ac92eba84c4b64ff8b5ccf9524f2ac454 |