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

Uploaded Source

Built Distribution

gundi_client_v2-2.1.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gundi_client_v2-2.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for gundi_client_v2-2.1.3.tar.gz
Algorithm Hash digest
SHA256 d1959304e047e077edf6f7696b3054dca5570ce1d14455058f6b0664d2796857
MD5 43123335d7f990dfff0cfadb61990198
BLAKE2b-256 e9311615f3580d33856d20f579bd4662100ce18aa8f3a7ead7e9f653bf083e8e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for gundi_client_v2-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f90614950f9a36ad1f17807f9023a206b4716383b8eab5f08e4baec6fecb65b
MD5 a7a6611b62bd3b9edd739a0032c9bdb4
BLAKE2b-256 3ebdb299c8eaddfbe174d777588705a78191e1f713500c7ffdcf7cb8a81203ea

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