Skip to main content

An async client for Gundi's API

Project description

Gundi Client

Introduction

Gundi, a.k.a "The Portal" is a platform to manage integrations. The gundi-client is an async python client to interact with Gundi's REST API.

Installation

pip install gundi-client-v2

Usage

from gundi_client_v2 import GundiClient
import httpx

# You can use it as an async context-managed client
async with GundiClient() as client:
   try:
    connection = await client.get_connection_details(
        integration_id="some-integration-uuid"
    )
    except httpx.RequestError as e:
        logger.exception("Request Error")   
        ...
    except httpx.TimeoutException as e:
        logger.exception("Request timed out")
        ...
    except httpx.HTTPStatusError as e:
        logger.exception("Response returned error")
    else:
        for integration in connection.destinations:  
            ...
   ...

# Or create an instance and close the client explicitly later
client = GundiClient()
try:
    response = await client.get_connection_details(
        integration_id="some-integration-uuid"
    )
    except httpx.RequestError as e:
        logger.exception("Request Error")   
        ...
    except httpx.TimeoutException as e:
        logger.exception("Request timed out")
        ...
    except httpx.HTTPStatusError as e:
        logger.exception("Response returned error")
    else:
        for integration in connection.destinations:
            ...
   ...
   await client.close()  # Close the session used to send requests to Gundi

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

gundi_client_v2-2.1.7.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

gundi_client_v2-2.1.7-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file gundi_client_v2-2.1.7.tar.gz.

File metadata

  • Download URL: gundi_client_v2-2.1.7.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for gundi_client_v2-2.1.7.tar.gz
Algorithm Hash digest
SHA256 168f17af90d81f5821abb58051af565f6b23867db82a502f5f03a83d53a42952
MD5 c97d344e6bd1f3316db40c68a49431de
BLAKE2b-256 5f181ebafd5df80520d526ebbccfced5d5a48022ded057c88419848f5bdb5929

See more details on using hashes here.

Provenance

File details

Details for the file gundi_client_v2-2.1.7-py3-none-any.whl.

File metadata

  • Download URL: gundi_client_v2-2.1.7-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for gundi_client_v2-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba4c45927d517d5785f6f1f28bfba531b26787645be494cd77dfe18ee85e9ed
MD5 56c8cb1dfb9f10a3d10a759502b9fe3b
BLAKE2b-256 36089080347f64ee15aaacc7800d67170c225f619c0d5e358ad3d4ec3b87144b

See more details on using hashes here.

Provenance

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