Skip to main content

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


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.6.0.tar.gz (62.3 kB view details)

Uploaded Source

File details

Details for the file brayns-3.6.0.tar.gz.

File metadata

  • Download URL: brayns-3.6.0.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for brayns-3.6.0.tar.gz
Algorithm Hash digest
SHA256 7f9d5ef4707f7cc1b379dc02cca53dc58620a821fe94221668e31765f2a87661
MD5 e6833fc68d0d73a23a1fda2b5b535eb7
BLAKE2b-256 be112f40743a52421dfa1a80205cba2798de40ef4771f6905685fed1c3de4e8a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page