Skip to main content

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

  1. email - Biomage email
  2. password - Biomage password
  3. instance_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

Release files for biomage-programmatic-interface 0.0.39

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biomage-programmatic-interface 0.0.39
File Size Uploaded
biomage_programmatic_interface-0.0.39.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biomage-programmatic-interface 0.0.39
File Interpreter ABI Platform
biomage_programmatic_interface-0.0.39-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / biomage_programmatic_interface-0.0.39.tar.gz

Download URL biomage_programmatic_interface-0.0.39.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
713e43623d131bd3aeb71bc7408d8673812412ec513757b9e907c3078fa995c7
BLAKE2b-256 checksum
How to use checksums
87a5f18315559cd34587b9e6a6eaf692893befa03781b521ae9e819bd1595d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / biomage_programmatic_interface-0.0.39-py3-none-any.whl

Download URL biomage_programmatic_interface-0.0.39-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e8f835cbc3ecf9a85b9cda658f15f41694b775470bca6d8e9c30d7d5d1548f7
BLAKE2b-256 checksum
How to use checksums
23bc20a28a32fce35ca19ac88756d0bfbd08c34c8f5e5aa4d84ffa82cd892443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.0.39 This release

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.35

2 release files

0.0.34

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page