-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
610b88b
commit d92907a
Showing
6 changed files
with
107 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,55 @@ | ||
# Brayns | ||
|
||
The python brayns package provides a python API to the brayns application. | ||
The brayns package provides a python API to the brayns application. | ||
|
||
## Documentation | ||
|
||
Brayns documentation is built and hosted on [readthedocs](https://readthedocs.org/). | ||
|
||
* [latest snapshot](http://brayns.readthedocs.org/en/latest/) | ||
* [latest release](http://brayns.readthedocs.org/en/stable/) | ||
|
||
## Installation | ||
|
||
It is recommended that you use [`pip`](https://pip.pypa.io/en/stable/) to install | ||
`Brayns` into a [`virtualenv`](https://virtualenv.pypa.io/en/stable/). The following | ||
assumes a `virtualenv` named `venv` has been set up and | ||
activated. We will see three ways to install `Brayns` | ||
|
||
|
||
### 1. From the Python Package Index | ||
|
||
``` | ||
(venv)$ pip install brayns | ||
``` | ||
|
||
### 2. From git repository | ||
|
||
``` | ||
(venv)$ pip install git+https://github.com/BlueBrain/Brayns.git#subdirectory=python | ||
``` | ||
|
||
### 3. From source | ||
|
||
Clone the repository and install it: | ||
|
||
``` | ||
(venv)$ git clone https://github.com/BlueBrain/Brayns.git | ||
(venv)$ pip install -e ./Brayns/python | ||
``` | ||
|
||
This installs `Brayns` into your `virtualenv` in "editable" mode. That means changes | ||
made to the source code are seen by the installation. To install in read-only mode, omit | ||
the `-e`. | ||
|
||
## Get started | ||
|
||
Simple connect: | ||
|
||
```python | ||
>>> import brayns | ||
>>> from brayns import Client | ||
|
||
>>> app = brayns.Brays('localhost:8200') | ||
>>> print(app) | ||
>>> brayns = brayns.Client('localhost:8200') | ||
>>> print(brayns) | ||
Brayns version 0.7.0.c52dd4b running on http://localhost:8200/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Examples | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
.. notebook:: ../../examples/snapshot.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from brayns import Client\n", | ||
"brayns = Client('localhost:8200')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"brayns.image(size=(400,300))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters