biomage-programmatic-interface


Namebiomage-programmatic-interface JSON
Version 0.0.39 PyPI version JSON
download
home_pagehttps://github.com/biomage-org/programmatic_interface
SummaryFor programmatic upload of files to Cellencis
upload_time2023-02-09 10:48:20
maintainer
docs_urlNone
authorBiomage Ltd
requires_python
license
keywords pypi cicd python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            \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:

```python
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](https://scp.biomage.net/) 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:
```bash
cd programmatic_interface
make install
```

- Now you can import the package and use your local version

```python
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)

```python
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/`) 

```python
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* 



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/biomage-org/programmatic_interface",
    "name": "biomage-programmatic-interface",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pypi,cicd,python",
    "author": "Biomage Ltd",
    "author_email": "engineering@biomage.net",
    "download_url": "https://files.pythonhosted.org/packages/87/a5/f18315559cd34587b9e6a6eaf692893befa03781b521ae9e819bd1595d60/biomage_programmatic_interface-0.0.39.tar.gz",
    "platform": null,
    "description": "\\n# biomage-programmatic-interface\n\n\n### About\nThis python package provides an easy way to create projects and upload samples into Biomage.\n\n## Installation\nTo install the package execute the following line:\n\n`pip install biomage-programmatic-interface`\n\n## Usage\nIn 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.\n\nThen the package is used in the following way:\n\n```python\nimport biomage_programmatic_interface as bpi\n\n# 1. Authenticate user and create a connection tunnel with the api\n# Default instance-url: https://api.scp.biomage.net/\nconnection = bpi.Connection('email', 'password', 'instance_url')\n\n# 2. Create an experiment\nexperiment = connection.create_experiment('experiment name')\n\n# 3. Upload samples associated with the experiment\nexperiment.upload_samples('local/path/to/samples')\n```\n\nOnce the upload is complete you can navigate to [Biomage](https://scp.biomage.net/) and process your project there.\n\n### `Connection` class\n\nThe object accepts 3 parameters:\n1. `email` - Biomage email\n2. `password` - Biomage password\n3. `instance_url` - Biomage instance url\n\n- Copy the url of the Biomage instance *excluding* `https://`\n- If the url is https://scp.biomage.net/ enter just the domain name: `scp.biomage.net`\n\n\n\n## Development\n\nIf you cloned the repository and want to try using your local version, do the following:\n\n- Install the local version of the pip package:\n```bash\ncd programmatic_interface\nmake install\n```\n\n- Now you can import the package and use your local version\n\n```python\nimport biomage_programmatic_interface as bpi\n```\n\n***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.\n\n### Running with local instance of Cellenics\n\nWhen creating the `connection` object set the `instance_url` to `local`. Now the programmatic interface will use your local api (https://localhost:3000)\n\n```python\nimport biomage_programmatic_interface as bpi\nconn = bpi.Connection(<YOUR EMAIL>, <YOUR PASSWORD>, 'local')\n...\n```\n\n### Running with staged environment\nSet the full path of the instance url (e.g. `https://api-{ENVIRONMENT NAME}.scp-staging.biomage.net/`) \n\n```python\nimport biomage_programmatic_interface as bpi\nconn = bpi.Connection(<YOUR EMAIL>, <YOUR PASSWORD>, 'https://api-{ENVIRONMENT NAME}.scp-staging.biomage.net/')\n...\n```\n\n*NOTE: the url is that of the api (i.e. `api-`) and not that of the ui* \n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "For programmatic upload of files to Cellencis",
    "version": "0.0.39",
    "split_keywords": [
        "pypi",
        "cicd",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23bc20a28a32fce35ca19ac88756d0bfbd08c34c8f5e5aa4d84ffa82cd892443",
                "md5": "33cc1b7f203ab067a926ea6d6d0a7c54",
                "sha256": "4e8f835cbc3ecf9a85b9cda658f15f41694b775470bca6d8e9c30d7d5d1548f7"
            },
            "downloads": -1,
            "filename": "biomage_programmatic_interface-0.0.39-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33cc1b7f203ab067a926ea6d6d0a7c54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9305,
            "upload_time": "2023-02-09T10:48:18",
            "upload_time_iso_8601": "2023-02-09T10:48:18.163676Z",
            "url": "https://files.pythonhosted.org/packages/23/bc/20a28a32fce35ca19ac88756d0bfbd08c34c8f5e5aa4d84ffa82cd892443/biomage_programmatic_interface-0.0.39-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87a5f18315559cd34587b9e6a6eaf692893befa03781b521ae9e819bd1595d60",
                "md5": "796c72e62cdeb48d226c5543b89354e3",
                "sha256": "713e43623d131bd3aeb71bc7408d8673812412ec513757b9e907c3078fa995c7"
            },
            "downloads": -1,
            "filename": "biomage_programmatic_interface-0.0.39.tar.gz",
            "has_sig": false,
            "md5_digest": "796c72e62cdeb48d226c5543b89354e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8065,
            "upload_time": "2023-02-09T10:48:20",
            "upload_time_iso_8601": "2023-02-09T10:48:20.200143Z",
            "url": "https://files.pythonhosted.org/packages/87/a5/f18315559cd34587b9e6a6eaf692893befa03781b521ae9e819bd1595d60/biomage_programmatic_interface-0.0.39.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-09 10:48:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "biomage-org",
    "github_project": "programmatic_interface",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "biomage-programmatic-interface"
}
        
Elapsed time: 0.15014s