{ "info": { "author": "Daniel Nachbaur", "author_email": "bbp-open-source@googlegroups.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Brayns Python Client\n\n> A client for [Brayns](../README.md) based on the [Rockets client](https://github.com/BlueBrain/Rockets/blob/master/python/README.md) to provide remote control of a running Brayns instance.\n\n[![Travis CI](https://img.shields.io/travis/BlueBrain/Brayns/master.svg?style=flat-square)](https://travis-ci.org/BlueBrain/Brayns)\n\n\n# Table of Contents\n\n* [Installation](#installation)\n* [Usage](#usage)\n * [Connection](#connection)\n * [Properties](#properties)\n * [Methods](#methods)\n * [Snapshot](#snapshot)\n * [Live rendering](#live)\n\n\n### Installation\n----------------\nYou can install this package from [PyPI](https://pypi.org/):\n```bash\npip install brayns\n```\n\n### Usage\n---------\n\n#### `Client` vs. `AsyncClient`\nBrayns provides two types of clients to support asychronous and synchronous usage.\n\nThe `AsyncClient` exposes all of its functionality as `async` functions, hence an `asyncio`\n[event loop](https://docs.python.org/3/library/asyncio-eventloop.html) is needed to complete pending\nexecution via `await` or `run_until_complete()`. The added benefit is to watch progress of pending\ntasks or cancel their execution. This is provided by according widgets if the Brayns client is used\nfrom within a Jupyter notebook.\n\nFor simplicity, a synchronous `Client` is provided which automagically executes in a synchronous,\nblocking fashion.\n\n#### Connection\nCreate a client:\n```py\nfrom brayns import Client\n\nclient = Client('localhost:8200')\nprint(brayns)\n`Brayns version 0.8.0.c52dd4b running on http://localhost:8200/`\n```\n\nCreate an asynchronous client:\n```py\nfrom brayns import AsyncClient\n\nclient = await AsyncClient('localhost:8200')\nprint(brayns)\n`Brayns version 0.8.0.c52dd4b running on http://localhost:8200/`\n```\n\n\n#### Properties\nExposed properties from Brayns are properties on the python side as well:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nprint(client.camera)\n```\n\nChanges on the properties must be communicated with `commit()` to Brayns:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nclient.camera.origin = [1,2,3]\nclient.camera.commit()\n```\n\n\n#### Methods\nCalling an RPC on Brayns is as simple as calling a method on the client object:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nclient.set_camera(current='orthographic')\n```\n\nAbove method does only return something on error. There are also requests:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nclip_planes = client.get_clip_planes()\n```\n\n\n#### Snapshot\nMake a snapshot and return a PIL image:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nimg = client.image(format='png', size=(1920, 1080), samples_per_pixel=64)\n```\n\n#### Live rendering\nIf you are using the client in a Jupyter notebook, you can watch the live rendering of Brayns in a widget:\n```py\nfrom brayns import Client\n\nclient = Client('myhost:8080')\n\nclient.show()\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BlueBrain/Brayns", "keywords": "brayns,raytracing,bbp,BlueBrain", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "brayns", "package_url": "https://pypi.org/project/brayns/", "platform": "", "project_url": "https://pypi.org/project/brayns/", "project_urls": { "Homepage": "https://github.com/BlueBrain/Brayns" }, "release_url": "https://pypi.org/project/brayns/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Brayns python API", "version": "1.0.0" }, "last_serial": 5829095, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bc4760318ab1deb711da794f08593b0b", "sha256": "d9dad5a38437bcd7c0bd546ecd2d3dbcc5fddde13fb91f90d23593474c8f0def" }, "downloads": -1, "filename": "brayns-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc4760318ab1deb711da794f08593b0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31172, "upload_time": "2019-09-13T22:31:16", "url": "https://files.pythonhosted.org/packages/6a/a4/b0299e24e02b89bad5922ac066cb1c8d87dddf32ad83e0e9fb8e3613f101/brayns-0.1.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "8be147e448e3666d577f5c0d81f1d0f2", "sha256": "5abe980d19d279706d3ca6862861e57bf0045fed28c57f0187fe5fe718509f40" }, "downloads": -1, "filename": "brayns-0.7.0.tar.gz", "has_sig": false, "md5_digest": "8be147e448e3666d577f5c0d81f1d0f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12662, "upload_time": "2018-09-05T14:43:33", "url": "https://files.pythonhosted.org/packages/b2/3b/e2fc46f3e6ddc09de485a8242ccc2225a2a9149e22f9df09d36165670498/brayns-0.7.0.tar.gz" } ], "0.7.0.dev0": [ { "comment_text": "", "digests": { "md5": "58a67c1c3945fdd9bf6f8393ad34e78e", "sha256": "c80ff1de2376528e6609e31933c9778400d906154b3eed674fc5b7b01cb09731" }, "downloads": -1, "filename": "brayns-0.7.0.dev0.tar.gz", "has_sig": false, "md5_digest": "58a67c1c3945fdd9bf6f8393ad34e78e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11980, "upload_time": "2018-07-25T12:44:02", "url": "https://files.pythonhosted.org/packages/15/0b/c24bf9a4d6c2114669f7adab61d5eb178c9af92ca7fc114aafe37568d875/brayns-0.7.0.dev0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "d12fecedda731684cc1813963229049b", "sha256": "d9a159ba8761a477cc29eb50ef5af15a24e30e42cc95bc1ea8ecff4ee780f600" }, "downloads": -1, "filename": "brayns-0.8.0.tar.gz", "has_sig": false, "md5_digest": "d12fecedda731684cc1813963229049b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14304, "upload_time": "2019-03-01T10:27:05", "url": "https://files.pythonhosted.org/packages/97/8a/dcb860b847934a50dc0d282759aec064a5566f3b2047465e87b53f1c1f07/brayns-0.8.0.tar.gz" } ], "0.8.0.dev0": [ { "comment_text": "", "digests": { "md5": "67a2b5241984f73bc3c0d4849b725d9e", "sha256": "bc0e55b9eeeec57fb83050c2e453160f286a6699f698502c3de67b2508c2cd15" }, "downloads": -1, "filename": "brayns-0.8.0.dev0.tar.gz", "has_sig": false, "md5_digest": "67a2b5241984f73bc3c0d4849b725d9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13746, "upload_time": "2018-10-15T09:52:17", "url": "https://files.pythonhosted.org/packages/da/fe/d0e19ff6a5579c9a751ac1526193f53351460a7060a6d43cb4a00c861883/brayns-0.8.0.dev0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "2fcb0fd90300c9fb6bc4f44ee1770948", "sha256": "ecc9b9cea4c479b56060e72974343daedc35804573a47674faa77d532d9e2b47" }, "downloads": -1, "filename": "brayns-0.8.1.tar.gz", "has_sig": false, "md5_digest": "2fcb0fd90300c9fb6bc4f44ee1770948", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14382, "upload_time": "2019-07-31T14:16:30", "url": "https://files.pythonhosted.org/packages/5f/69/30721ec94cb742ebee9069f67e7fe3cf77fa5f9d144eaef52b934d993267/brayns-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "b8734a328a96430a09942c11f0453e85", "sha256": "2fa5596c2688c157fbe29f15d28061b7deddb04bdece0ebb151115205d42ae24" }, "downloads": -1, "filename": "brayns-0.8.2.tar.gz", "has_sig": false, "md5_digest": "b8734a328a96430a09942c11f0453e85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31160, "upload_time": "2019-09-13T10:07:15", "url": "https://files.pythonhosted.org/packages/a6/6e/5bf5211f246d80191ce3e42218a14c9eb59e6b4cb7d92701fd914d00ac5c/brayns-0.8.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "93dd42521b8e5e7005819510a19fa862", "sha256": "cf119c6f12f9cfbd7f0b334026abe3d6869495ebb7e9dfef407c134f84c12a22" }, "downloads": -1, "filename": "brayns-1.0.0.tar.gz", "has_sig": false, "md5_digest": "93dd42521b8e5e7005819510a19fa862", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31167, "upload_time": "2019-09-14T11:18:23", "url": "https://files.pythonhosted.org/packages/47/5c/6594e0ac63e4ff6e70a06326d0575d6c9992a96aff1549c0032e0b56070a/brayns-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "93dd42521b8e5e7005819510a19fa862", "sha256": "cf119c6f12f9cfbd7f0b334026abe3d6869495ebb7e9dfef407c134f84c12a22" }, "downloads": -1, "filename": "brayns-1.0.0.tar.gz", "has_sig": false, "md5_digest": "93dd42521b8e5e7005819510a19fa862", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31167, "upload_time": "2019-09-14T11:18:23", "url": "https://files.pythonhosted.org/packages/47/5c/6594e0ac63e4ff6e70a06326d0575d6c9992a96aff1549c0032e0b56070a/brayns-1.0.0.tar.gz" } ] }