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

Uploaded Source

Built Distribution

gundi_client_v2-2.3.8-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gundi_client_v2-2.3.8.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for gundi_client_v2-2.3.8.tar.gz
Algorithm Hash digest
SHA256 0556867c87822194058dc01c8735f58d86039d1c71540b210f9c32d63928cf20
MD5 a62f67fe979e80d32db4235f45acfe0a
BLAKE2b-256 a13b5a359c7dcde22b58ad4fdecf5a0f69898e3deb8a75a4b39fc2dcdccf3cbe

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for gundi_client_v2-2.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 653ce8768ef53c54725b5ff011d1df0d2ccc4adf10195965095ee872941adc3e
MD5 677598ebb5fc26babde3eb122647f2c9
BLAKE2b-256 b30c385fd14365b9a1233b61fe970727dff95d3b837ab113e3dbc493f975de08

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