ChRIS Python client library built on aiohttp (async HTTP client) and pyserde (dataclasses deserializer).
Requires Python 3.11 or 3.12.
pip install aiochris
# or
rye add aiochris
For convenience, container images are also provided.
docker pull ghcr.io/fnndsc/aiochris:0.3.0
import asyncio
from aiochris import ChrisClient
async def readme_example():
chris = await ChrisClient.from_login(
username='chris',
password='chris1234',
url='https://cube.chrisproject.org/api/v1/'
)
dircopy = await chris.search_plugins(name_exact='pl-brainmgz', version='2.0.3').get_only()
plinst = await dircopy.create_instance(compute_resource_name='host')
feed = await plinst.get_feed()
await feed.set(name="hello, aiochris!")
await chris.close() # do not forget to clean up!
asyncio.run(readme_example())
- Client documentation: https://fnndsc.github.io/aiochris
- Developer documentation: https://github.com/FNNDSC/aiochris/wiki