Skip to main content

ChRIS client built on aiohttp

Project description

aiochris

Tests codecov PyPI License - MIT Code style: black

ChRIS Python client library built on aiohttp (async HTTP client) and pyserde (dataclasses deserializer).

Installation

Requires Python 3.10 or 3.11.

pip install aiochris
# or
poetry add aiochris

For convenience, container images are also provided.

docker pull ghcr.io/fnndsc/aiochris:0.3.0

Quick Example

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())

Documentation Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiochris-0.4.0.tar.gz (24.4 kB view hashes)

Uploaded Source

Built Distribution

aiochris-0.4.0-py3-none-any.whl (32.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page