Brayns Python API
Project description
Brayns Python API
A client for Brayns based on a websocket client to provide remote control on a running braynsService instance.
Table of Contents
Installation
You can install this package from PyPI:
pip install brayns
Or from source:
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:
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:
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.
models = brayns.get_models(instance)
Documentation
A more complete documentation is available here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brayns-3.5.1.tar.gz
(61.8 kB
view details)
File details
Details for the file brayns-3.5.1.tar.gz
.
File metadata
- Download URL: brayns-3.5.1.tar.gz
- Upload date:
- Size: 61.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf29208c0e7235954c072e2cd861aa047dac74cd8d4ce2d08f604018a36994c6 |
|
MD5 | 95abf9f9bf20845e8563d3776ce99f8a |
|
BLAKE2b-256 | 3f529b2bd714d74df1bb3bf00326ebe667256a35514f9af2b621617650f15127 |