# 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/53/f8/f189ba6c3074485e58c244d5e9afac6fd64b4dcc8c304c41adaa563d8365/brayns-3.10.1.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.1",
"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": "53f8f189ba6c3074485e58c244d5e9afac6fd64b4dcc8c304c41adaa563d8365",
"md5": "e08d6d25e2a596915c984fa198bad3c4",
"sha256": "71756fc956520ea7cf6bef561628c7a66625fa84608b30acd4eab6b238ad1c04"
},
"downloads": -1,
"filename": "brayns-3.10.1.tar.gz",
"has_sig": false,
"md5_digest": "e08d6d25e2a596915c984fa198bad3c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 63055,
"upload_time": "2024-11-26T07:45:42",
"upload_time_iso_8601": "2024-11-26T07:45:42.237241Z",
"url": "https://files.pythonhosted.org/packages/53/f8/f189ba6c3074485e58c244d5e9afac6fd64b4dcc8c304c41adaa563d8365/brayns-3.10.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 07:45:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BlueBrain",
"github_project": "Brayns",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "brayns"
}