Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRAYNS-651 Cleanup python package #1273

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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