Skip to content

Commit

Permalink
Python package reset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien4193 committed Jun 28, 2024
1 parent b62cae2 commit 9a0ffb3
Show file tree
Hide file tree
Showing 291 changed files with 542 additions and 29,951 deletions.
22 changes: 9 additions & 13 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
.coverage
.idea/
brayns.egg-info/
build
.installed
pycodestyle.txt
pydocstyle.txt
pylint.txt
.mypy_cache
.pytest_cache
.ruff_cache
.vscode
venv
__pycache__
*.pyc
dist/
.tox/
venv/
doc/source/.ipynb_checkpoints/
doc/html
dist
build
*.egg-info
1 change: 0 additions & 1 deletion python/MANIFEST.in

This file was deleted.

34 changes: 2 additions & 32 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,13 @@ 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
pip install .
```

## 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)
```
TODO

## Documentation
-----------------
Expand Down
Loading

0 comments on commit 9a0ffb3

Please sign in to comment.