bioexplorer


Namebioexplorer JSON
Version 1.7.1 PyPI version JSON
download
home_pagehttps://github.com/BlueBrain/BioExplorer.git
SummaryPython API for the Blue Brain BioExplorer
upload_time2023-12-12 17:13:19
maintainer
docs_urlNone
authorBlue Brain Project, EPFL
requires_python
licenseLGPLv3
keywords covid covid19 coronavirus bbp blue brain virus molecule molecular system
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Blue Brain BioExplorer Python SDK

The bioexplorer package provides an extended python API for the Blue Brain BioExplorer application

## Installation

### 1. From the Python Package Index

```
(venv)$ pip install bioexplorer
```

### 2. From source

Clone the repository and install it:

```
(venv)$ git clone https://github.com/BlueBrain/BioExplorer.git
(venv)$ cd BioExplorer/bioexplorer/pythonsdk
(venv)$ pip install .
```

## API

### Connect to running Blue Brain BioExplorer instance

```python
from bioexplorer import BioExplorer
bio_explorer = BioExplorer('localhost:5000')
```

### Snapshot

The following example illustrates how to connect to the Blue Brain BioExplorer and export a snapshot of the current view to disk. The snapshot is exported to the /tmp folder, with a resolution of 512x512, and with 16 samples per pixel.

```python
from bioexplorer import BioExplorer, MovieMaker

bio_explorer = BioExplorer('localhost:5000')
movie_maker = MovieMaker(bio_explorer)

movie_maker.create_snapshot(
    renderer='bio_explorer', path='/tmp', base_name='test', ,size=[512, 512], samples_per_pixel=16)
```

### Movie

The following example illustrates how to connect to the Blue Brain BioExplorer and generate a set of frames according to some given camera control points. Frames are exported to the /tmp folder.

```python
from bioexplorer import BioExplorer, MovieMaker

bio_explorer = BioExplorer('localhost:5000')
movie_maker = MovieMaker(bio_explorer)

control_points = [
    {
        'apertureRadius': 0.0,
        'direction': [0.0, 0.0, -1.0],
        'focusDistance': 0.0,
        'origin': [0.5, 0.5, 1.5],
        'up': [0.0, 1.0, 0.0]
    },
    {
        'apertureRadius': 0.0,
        'direction': [-0.482, -0.351, -0.802],
        'focusDistance': 0.0,
        'origin': [2.020, 1.606, 3.030],
        'up': [-0.199, 0.936, -0.289]
    }
]

movie_maker.build_camera_path(
    control_points=control_points, nb_steps_between_control_points=50,
    smoothing_size=50)

movie_maker.set_current_frame(10)
movie_maker.create_movie(
    path='/tmp', size=[512, 512], samples_per_pixel=16, start_frame=10, end_frame=20)
```

# Upload to pypi

```bash
twine upload dist/*
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BlueBrain/BioExplorer.git",
    "name": "bioexplorer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "covid,covid19,coronavirus,bbp,blue,brain,virus,molecule,molecular system",
    "author": "Blue Brain Project, EPFL",
    "author_email": "bbp-open-source@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/6f/ed/419a125c3042c2fd4b1d3407bbb9bc0044ff18c27f79971ef0d5096eeb1b/bioexplorer-1.7.1.tar.gz",
    "platform": null,
    "description": "# Blue Brain BioExplorer Python SDK\n\nThe bioexplorer package provides an extended python API for the Blue Brain BioExplorer application\n\n## Installation\n\n### 1. From the Python Package Index\n\n```\n(venv)$ pip install bioexplorer\n```\n\n### 2. From source\n\nClone the repository and install it:\n\n```\n(venv)$ git clone https://github.com/BlueBrain/BioExplorer.git\n(venv)$ cd BioExplorer/bioexplorer/pythonsdk\n(venv)$ pip install .\n```\n\n## API\n\n### Connect to running Blue Brain BioExplorer instance\n\n```python\nfrom bioexplorer import BioExplorer\nbio_explorer = BioExplorer('localhost:5000')\n```\n\n### Snapshot\n\nThe following example illustrates how to connect to the Blue Brain BioExplorer and export a snapshot of the current view to disk. The snapshot is exported to the /tmp folder, with a resolution of 512x512, and with 16 samples per pixel.\n\n```python\nfrom bioexplorer import BioExplorer, MovieMaker\n\nbio_explorer = BioExplorer('localhost:5000')\nmovie_maker = MovieMaker(bio_explorer)\n\nmovie_maker.create_snapshot(\n    renderer='bio_explorer', path='/tmp', base_name='test', ,size=[512, 512], samples_per_pixel=16)\n```\n\n### Movie\n\nThe following example illustrates how to connect to the Blue Brain BioExplorer and generate a set of frames according to some given camera control points. Frames are exported to the /tmp folder.\n\n```python\nfrom bioexplorer import BioExplorer, MovieMaker\n\nbio_explorer = BioExplorer('localhost:5000')\nmovie_maker = MovieMaker(bio_explorer)\n\ncontrol_points = [\n    {\n        'apertureRadius': 0.0,\n        'direction': [0.0, 0.0, -1.0],\n        'focusDistance': 0.0,\n        'origin': [0.5, 0.5, 1.5],\n        'up': [0.0, 1.0, 0.0]\n    },\n    {\n        'apertureRadius': 0.0,\n        'direction': [-0.482, -0.351, -0.802],\n        'focusDistance': 0.0,\n        'origin': [2.020, 1.606, 3.030],\n        'up': [-0.199, 0.936, -0.289]\n    }\n]\n\nmovie_maker.build_camera_path(\n    control_points=control_points, nb_steps_between_control_points=50,\n    smoothing_size=50)\n\nmovie_maker.set_current_frame(10)\nmovie_maker.create_movie(\n    path='/tmp', size=[512, 512], samples_per_pixel=16, start_frame=10, end_frame=20)\n```\n\n# Upload to pypi\n\n```bash\ntwine upload dist/*\n```",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "Python API for the Blue Brain BioExplorer",
    "version": "1.7.1",
    "project_urls": {
        "Documentation": "https://bluebrain.github.io/BioExplorer/",
        "Homepage": "https://github.com/BlueBrain/BioExplorer.git",
        "Source": "https://github.com/BlueBrain/BioExplorer"
    },
    "split_keywords": [
        "covid",
        "covid19",
        "coronavirus",
        "bbp",
        "blue",
        "brain",
        "virus",
        "molecule",
        "molecular system"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fed419a125c3042c2fd4b1d3407bbb9bc0044ff18c27f79971ef0d5096eeb1b",
                "md5": "af501780742e717c3fec9f56eca38cd8",
                "sha256": "10374a29e0f14fe6a0921bc08c67b43a56ded5d3b7b8d54b36cb6816abbbb057"
            },
            "downloads": -1,
            "filename": "bioexplorer-1.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "af501780742e717c3fec9f56eca38cd8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 67073,
            "upload_time": "2023-12-12T17:13:19",
            "upload_time_iso_8601": "2023-12-12T17:13:19.082430Z",
            "url": "https://files.pythonhosted.org/packages/6f/ed/419a125c3042c2fd4b1d3407bbb9bc0044ff18c27f79971ef0d5096eeb1b/bioexplorer-1.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-12 17:13:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BlueBrain",
    "github_project": "BioExplorer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bioexplorer"
}
        
Elapsed time: 0.20110s