# Brayns Python API
> A client for [Brayns](../README.md) based on a websocket client to provide
remote control on a running braynsService instance.
# Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [Connection](#connection)
* [Raw requests](#rawrequests)
* [API](#api)
* [Documentation](#documentation)
## Installation
---------------
You can install this package from [PyPI](https://pypi.org/):
```bash
pip install brayns
```
Or from source:
```bash
git clone https://github.com/BlueBrain/Brayns.git
cd Brayns/python
python setup.py sdist
pip install dist/* # Output in dist folder
```
## Usage
--------
### Connection
Connect to a renderer backend instance:
```py
import brayns
connector = brayns.Connector('localhost:5000')
with connector.connect() as instance:
print(brayns.get_version(instance))
```
### Raw requests
Raw JSON-RPC requests can be sent using the instance:
```py
result = instance.request('schema', {'endpoint': 'get-version'})
```
It will throw a brayns.RequestError if an error occurs.
### API
As raw requests can be tedious, a higher level API is also provided.
```py
models = brayns.get_models(instance)
```
## Documentation
-----------------
A more complete documentation is available
[here](https://brayns.readthedocs.io/en/latest/).
Raw data
{
"_id": null,
"home_page": "https://github.com/BlueBrain/Brayns",
"name": "brayns",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "brayns, raytracing, bbp, BlueBrain",
"author": "Blue Brain Project",
"author_email": "bbp-open-source@googlegroups.com",
"download_url": "https://files.pythonhosted.org/packages/3b/bb/67b9f9691dcc971776134be1e42554dbaaa928260481e139ab6a21e7fbe0/brayns-3.10.0.tar.gz",
"platform": null,
"description": "# Brayns Python API\n\n> A client for [Brayns](../README.md) based on a websocket client to provide\nremote control on a running braynsService instance.\n\n# Table of Contents\n\n* [Installation](#installation)\n* [Usage](#usage)\n * [Connection](#connection)\n * [Raw requests](#rawrequests)\n * [API](#api)\n* [Documentation](#documentation)\n\n## Installation\n---------------\n\nYou can install this package from [PyPI](https://pypi.org/):\n\n```bash\npip install brayns\n```\n\nOr from source:\n\n```bash\ngit clone https://github.com/BlueBrain/Brayns.git\ncd Brayns/python\npython setup.py sdist\npip install dist/* # Output in dist folder\n```\n\n## Usage\n--------\n\n### Connection\n\nConnect to a renderer backend instance:\n\n```py\nimport brayns\n\nconnector = brayns.Connector('localhost:5000')\n\nwith connector.connect() as instance:\n print(brayns.get_version(instance))\n```\n\n### Raw requests\n\nRaw JSON-RPC requests can be sent using the instance:\n\n```py\nresult = instance.request('schema', {'endpoint': 'get-version'})\n```\n\nIt will throw a brayns.RequestError if an error occurs.\n\n### API\n\nAs raw requests can be tedious, a higher level API is also provided.\n\n```py\nmodels = brayns.get_models(instance)\n```\n\n## Documentation\n-----------------\n\nA more complete documentation is available\n[here](https://brayns.readthedocs.io/en/latest/).\n\n\n",
"bugtrack_url": null,
"license": "LGPLv3",
"summary": "Brayns Python API",
"version": "3.10.0",
"project_urls": {
"Download": "https://github.com/BlueBrain/Brayns",
"Homepage": "https://github.com/BlueBrain/Brayns",
"Source": "https://github.com/BlueBrain/Brayns",
"Tracker": "https://bbpteam.epfl.ch/project/issues/projects/BRAYNS/issues"
},
"split_keywords": [
"brayns",
" raytracing",
" bbp",
" bluebrain"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3bbb67b9f9691dcc971776134be1e42554dbaaa928260481e139ab6a21e7fbe0",
"md5": "925d0dfd7bb10172bdf123b4848575a2",
"sha256": "6bf9406f4901b2bd11802cbe4967ab027dfc1910025cd6de1cd244d695daa1cb"
},
"downloads": -1,
"filename": "brayns-3.10.0.tar.gz",
"has_sig": false,
"md5_digest": "925d0dfd7bb10172bdf123b4848575a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 63064,
"upload_time": "2024-09-10T07:17:02",
"upload_time_iso_8601": "2024-09-10T07:17:02.822437Z",
"url": "https://files.pythonhosted.org/packages/3b/bb/67b9f9691dcc971776134be1e42554dbaaa928260481e139ab6a21e7fbe0/brayns-3.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 07:17:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BlueBrain",
"github_project": "Brayns",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "brayns"
}