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.3.2.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiochris-0.3.2-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file aiochris-0.3.2.tar.gz.

File metadata

  • Download URL: aiochris-0.3.2.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.13 Linux/6.2.0-1012-azure

File hashes

Hashes for aiochris-0.3.2.tar.gz
Algorithm Hash digest
SHA256 dd1bba5f96223bc44deb97f43e04a8abb11419da443d557c06521c4962bbab3c
MD5 08f55b9358c2efdee205065ad24c88f7
BLAKE2b-256 cf3541f419240d1ffbaea929db9fb3d94ea2e2b708ef5506d6c39872d38e4752

See more details on using hashes here.

File details

Details for the file aiochris-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: aiochris-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.13 Linux/6.2.0-1012-azure

File hashes

Hashes for aiochris-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3eaa19bf4df6484874f7ce776f5dba3b40c703e00570c8555b2cf38b3410b707
MD5 d06854be36ce42850408a2658a8b2ad5
BLAKE2b-256 e72d502af4a79f0943c70122145d8065656e48f03f41859912ad979d655774d1

See more details on using hashes here.

Supported by

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